home *** CD-ROM | disk | FTP | other *** search
/ Creative Computers / Creative Computers CD-ROM, Volume 1 (Legendary Design Technologies, Inc.)(1994).iso / text / misc / mapamiga.txt.pp / mapamiga.txt
Text File  |  1994-11-17  |  402KB  |  9,761 lines

  1. "Mapping the Amiga" by Rhett Anderson and Randy Thompson.  A comprehensive
  2. guide to the inner world of the Amiga.    Covers libraries and hardware
  3. registers.  Examples in C, Assembly Language, and Modula 2.
  4.  
  5.  
  6. Preface
  7.  
  8. There are so many programming books for the Amiga. Why should there be
  9. another one?
  10. Frankly, we wrote this book for ourselves. When we sit down to program,
  11. we find that no single book is enough. The typical Amiga programmer may
  12. have Commodore's official reference manuals, several Sybex, Abacus, and
  13. COMPUTE! books, the complete set of Amiga Transactor magazines, and even
  14. several printouts of downloaded programming information and source code, all
  15. scattered across desks, chairs, and, of course, the floor. As you know, program-
  16. ming the Amiga is a tough job. You might spend an hour just tracking down
  17. the right source. What is the solution to this problem?
  18. We turned for inspiration to two books that helped us in the past: Mapping
  19. the Atari by Ian Chadwick (1983, COMPUTE! Books) and Mapping the Commo-
  20. dore 64 by Sheldon Leemon (1984, COMPUTE! Books). These books had it
  21. all-explanations of how the respective machines organized memory, detailed
  22. listings of what various memory locations were and how to use them, descrip-
  23. tions of input/output registers, and discussions of the functions of various
  24. ROM routines.
  25. These books were so detailed a programmer could literally write a program
  26. without putting fingerprints on a single other book.
  27. But of course you can't really do the same thing for the Amiga. The above-
  28. mentioned books were slightly over 200 pages. This book is more than twice as
  29. large and comes nowhere near to saying everything that can be said about the
  30. Amiga. If the Apple II's built-in software and hardware is an apartment, and the
  31. Commodore 64's is a townhouse, then the Amiga's is a Manhattan city block.
  32. And the problem is not just a matter of scale. Unlike earlier computers, the
  33. Amiga doesn't set aside areas of memory for this or that purpose. Instead, the
  34. Amiga has libraries of routines, which can show up virtually anywhere in the
  35. RAM space of the machine. These routines aren't even all in ROM; some are
  36. loaded from disk. The screen is not in a fixed location. Commodore even
  37. threatens that the locations of the memory-mapped custom chips may change
  38. at any time. The Amiga doesn't go through all these contortions to be contrary.
  39. Instead, this level of indirection provides the Amiga with prodigious flexibility.
  40. Libraries and devices are easily upgraded and added. Peripherals and input de-
  41. vices are easily accommodated.
  42.  
  43.  
  44. Aware of the problems of scale and flexibility, we set out to accomplish a
  45. different and (somewhat) more reasonable task: to enable a programmer to use
  46. our book as a reference work that answers 90 percent of his or her questions.
  47. This task took the two of us a year. We couldn't have done it alone. We'd like
  48. to thank Stephen Levy, our editor, for his patience. We would also like to
  49. thank our friends and co-workers at Amiga Resource and COMPUTE!, and also,
  50. especially, our wives, for putting up with months of odd moods and the occa-
  51. sional bout of crankiness. A special thanks goes out to Sheldon Leemon for his
  52. many suggestions and observations.
  53.  
  54. How to Use This Book:
  55. First, we suggest a little window shopping. Browse among the chapters and the
  56. appendices. Ever wonder how the blitter works? Curious about the HAM video
  57. mode? Cruise through the Hardware chapter. Want to know how the Amiga
  58. organizes its data? Want to know how to use the Amiga's built-in functions?
  59. The Structures and Libraries chapters tell you. Becoming familiar with the
  60. structure and content of the book will pay off later.
  61. If you're an expert programmer, we suggest a quick scan of the book.
  62. You'll probably use this book as a reference. Read the introductions to each
  63. chapter, and don't forget to check out the appendices.
  64. The majority of the book consists of tables and charts-a compilation of
  65. vital programming information organized in understandable and usable for-
  66. mats. Much of this information can't be found in any other single place. For ex-
  67. ample, where else can you find a complete listing of library functions that gives
  68. the syntax of each function in C, machine language, and Modula-2?
  69. Each major section of the book begins with an introduction that explains
  70. how to use the information that follows. So even if you're a beginner, you'll
  71. find this book a great way to learn about the Amiga's inner workings.
  72. If you already have a stable of Amiga programming books, notice how the
  73. layouts of those books compare with ours. For instance, some books group
  74. functions by the library in which they're found; Mapping the Amiga orders the
  75. functions alphabetically. Knowing this can save you some time and help you
  76. learn how to use Mapping in conjunction with your other programming books.
  77. If you don't have any other Amiga programming books, we'd like to sug-
  78. gest a few. Commodore's set of reference manuals (published by Addison Wes-
  79. ley) are invaluable. Be sure to get the latest set; new examples and tables have
  80. been included in every update so far. Sybex sells three excellent books: Eugene
  81. Mortimore's two-volume Amiga Programmer's Handbook and Rob Peck's Pro-
  82. gramming the Amiga. Abacus publishes many Amiga books. Our favorites are
  83. Amiga System Programmer's Guide and Amiga Graphics Inside & Out. COMPUTE!
  84. books also has many titles. We often turn to COMPUTE!'s Amiga Programming
  85. Guide and Sheldon Leemon's Inside Amiga Graphics. You'll also want a manual
  86. for the language you're using.
  87.  
  88. Programming and Mapping:
  89. You can program the Amiga in just about any language you've ever heard of
  90. (with the possible exception of COBOL). Each language has different syntax,
  91. requirements, and interfacing details. For this book, we've supported the lan-
  92. guages most familiar to us: Lattice C, M2S's M2Sprint Modula-2, and machine
  93. language. All programming examples given in this book were written using one
  94. of these languages. Users of other C and Modula-2 implementations should
  95. have little trouble using this book. If you use a different language, see the man-
  96. ual for information about how structure offsets are named and what parameters
  97. are passed to the various system functions.
  98. We hope this book will be useful to you. Don't hesitate to let us know
  99. what helped you and what you found lacking. Send mail to:
  100.  
  101. Rhett & Randy
  102. COMPUTE! Publications
  103. 324 W. Wendover Ave., Suite 200
  104. Greensboro, NC 27408
  105.  
  106. You might also be able to find us on your favorite online service, such as
  107. CompuServe, PLink, or GEnie. Ask your friendly local sysop.
  108. As Bill Wilkinson said in the introduction to Mapping the Atari, good luck
  109. and happy mapping.
  110.  
  111. Notes from BSI: It took about eight hours to scan and fix the majority of
  112. the typos caused by the scanner (HP ScanJet+) reading bold text incorrect-
  113. ly.  For that reason, I have not scanned the "Structures" part of the book.
  114. You can use you include files for DevPac2 instead.  (Or with Lattice, or
  115. with...)  However, I have included the "hardware" part since I manually
  116. typed that up when I first got my Amiga so I could learn where all the
  117. hardware registers are.  Enjoy the text.  Any questions can be left to me
  118. (Bansai) on Motherboard East 1.5 at 1(215)792-0167.  Slates!
  119. -------------------------
  120. Library Functions
  121.  
  122. The Amiga is an incredibly capable machine. It has so much to offer, from digi-
  123. tized sounds and dazzling color graphics to a window-based user interface and
  124. a true multitasking operating system. Library functions are the key to accessing
  125. these features.
  126. The Amiga's library functions are similar to the Commodore 64's ROM
  127. Kernal subroutines, the IBM PC's BIOS interrupt calls, and the Apple Macin-
  128. tosh's Toolbox procedures-they are a collection of routines that allow you to
  129. control almost every aspect of your computer. They're called functions because
  130. the majority of them were written in the C programming language. In C, all
  131. user-defined commands are referred to as functions.
  132.  
  133. Linked Libraries
  134. There are really two types of libraries on the Amiga: linked libraries and shared
  135. libraries. (Note: Amiga Basic and Modula-2 do not use linked libraries.)
  136. Linked libraries are a collection of external functions that you make part of
  137. your program. When you link your program with Alink or Blink, each linked li-
  138. brary function you use is brought in from one of the specified .lib files and
  139. stuffed into your program. The Lattice C file lc.lib and the Manx C file c.lib are
  140. both examples of linked libraries.
  141. The functions offered by a linked library are dependent upon your compil-
  142. er or assembler. However, one linked library is common-amiga.lib. The
  143. amiga.lib library offers common functions such as printf( ), atoi( ), and
  144. BeginIO( ). Only amiga.lib is documented in this chapter. Language-specific
  145. linked libraries are explained in the manual that came with your compiler or
  146. assembler.
  147. Using an amiga.lib function in C is incredibly easy: Simply call the func-
  148. tion by name and then link your program with amiga.lib. For Lattice C users,
  149. linking with amiga.lib is automatic when you use the compiler's -L option.
  150. Other compilers simply have you provide the amiga.lib filename as one of the
  151. library parameters in the Alink or Blink command sequence.
  152. Accessing amiga.lib from machine language is a bit tougher. First you must
  153. declare that function with an XREF statement, preceding the function name with
  154. an underline character (xref _CreateExtIO, for example). Second, you must
  155. push the function arguments onto the stack, not place them into registers. To
  156. actually call the function you simply JSR to the function name, as in JSR
  157. _CreateExtIO. Finally, you must remove the function arguments from the
  158. stack- the function does not do this for you. A simple addq.l #8,sp would suf-
  159. fice for CreateExtIO( ) since this function accepts two long words (eight bytes)
  160. worth of arguments.
  161. All of the amiga.lib functions are described in the function tables found at
  162. the end of this chapter. Here's the entry for amiga.lib's printf( ) function:
  163. -------------------------
  164. printf
  165. Description:        prints a formatted string to the standard output (Lattice and Manx
  166.             users: if you link with lc.lib or c.lib, this is not the function you're
  167.             calling)
  168. Library:        amiga.lib (linked library)
  169. Modula-2 Module:    none
  170. Syntax:         printf(string, values...)
  171. C:            void printf(char *, long...)
  172. Machine Language:    move.l #value,-(sp) ;may have several values
  173.             pea string
  174.             jsr _printf
  175.             add.l #8,sp ;(2 arguments * 4 bytes = 8)
  176. Modula-2:        not available
  177. Arguments:string = pointer to string containing optional C formatting com-
  178.     mands (%); if you're passing longword values on the stack (as
  179.     shown above), be sure to follow the percent symbol with a lower-
  180.     case L
  181.     values = values or addresses of strings to print; this routine
  182.     knows how many values are on the stack by checking the number
  183.     of formatting commands in the string argument
  184. Result: none
  185. -------------------------
  186. The Machine Language entry in this table illustrates how you might call
  187. the printf( ) function from machine language. Specifically, it shows the order in
  188. which you must push the function's arguments onto the stack. In all cases, the
  189. arguments are pushed onto the stack in the order opposite to that shown in the
  190. Syntax entry (right to left instead of left to right).
  191. In these crude machine language examples, all pointer arguments are
  192. placed onto the stack using a PEA instruction. In actual use, the argument's ad-
  193. dress may be contained in a register or a memory location, in which case you
  194. would MOVE it onto the stack. The examples shown here use PEA simply so
  195. you understand that the function expects an address and not an actual value. If
  196. the argument is supposed to be a value, we place it onto the stack via a MOVE
  197. instruction.
  198.  
  199. For a real-world example, the following machine language program makes
  200. use of amiga.lib's printf( ) function to output the solution to a simple equation:
  201. -------------------------
  202. Program 1-1. Simple Addition
  203.  
  204. * Machine language example for using the printf( ) linked library function
  205. * -Be sure to link with amiga.lib
  206.  
  207. * Hard-coded function offsets
  208. OpenLibrary  equ -552
  209. CloseLibrary equ -414
  210. Output         equ -60
  211.  
  212. AbsExecBase equ 4    ;Absolute location of ExecBase pointer
  213.  
  214.    XREF printf    ;Declaration for amiga.lib function
  215.    XDEF SysBase ;Make this available to amiga.lib
  216.    XDEF DOSBase ;Make this available to amiga lib
  217.    XDEF stdout    ;Make this available to amiga lib
  218.  
  219. SECTION code,CODE
  220.  
  221. * Short-but-effective startup code
  222.    movea.l AbsExecBase,a6    ;Pointer to IntuitionBase in a6
  223.    move.l a6, SysBase        ;Store it in external location for amiga.lib
  224.    clr.l d0            ;Version number goes in d0
  225.    movea.l #DOSName,a1        ;Pointer to library's name goes in a1
  226.    ]sr OpenLibrary(a6)        ;Open DOS library and return libBase in d0
  227.    move.l d0, d0SBase        ;Save library base pointer
  228.    beq.s Abort2         ;Abort if dos.library could not be opened
  229.    move.l d0,a6         ;Pointer to DOSBase in a6
  230.    jsr Output(a6)        ;Call Output to get an output file handle
  231.    move.l d0, stdout        ;and store it for amiga.lib
  232.    beq.s Abortl         ;Abort if unable to get a file handle
  233.  
  234. * Main program that adds Num1 and Num2
  235. move.l Num1,d0            ;Get Num1 into d0
  236. add.l Num2,d0            ;Add the two numbers and put result in d0
  237.  
  238. * Call printf( ) to print the addition result in decimal and in hex format
  239.    move.l d0,-(sp)    ;Push result onto stack for hex output
  240.    move.l d0,-(sp)    ;Push result onto stack for decimal output
  241.    move.l Num2,-(sp)    ;Push Num2 value on stack
  242.    move.l Num1,-(sp)    ;Push Num1 value on stack
  243.    pea formatString    ;Push address of formatString onto stack
  244.    jsr printf        ;Call printf( )
  245.    add.l #20,sp     ;Remove arguments from stack-
  246.             ;(5 arguments * 4 bytes = 20 bytes)
  247.  
  248. * Close DOS library
  249. Abort1:
  250.    move.l DOSBase,a1    ;Pointer to DOSBase in a1
  251.    move.l SysBase,a6    ;Pointer to ExecBase in a6
  252.    jsr CloseLibrary(a6) ;Call CloseLibrary( )
  253.  
  254. * Exit program
  255. Abort2:
  256.    clr.l d0        ;Set return code
  257.    rts            ;Drop out of program
  258.  
  259.  
  260. SECTION data,DATA
  261.  
  262. Num1:
  263.  
  264.    dc.l 8723    ;Value 1 that will be added to
  265. Num2:
  266.    dc.l 434    ;Value 2
  267.  
  268.  SysBase:
  269.    dc.l 0    ;Location to hold ExecBase pointer
  270.  DOSBase:
  271.    dc.l 0    ;Location to hold DOSBase pointer
  272.  stdout:
  273.    dc.l 0    ;Location to hold output handle
  274.  
  275. DOSName:
  276.    dc.b 'dos.library',0 ;Name of dos library
  277.  
  278. * The following statements define the format string to be used by printf( )
  279. * Note that a lowercase L follows all percent symbols (%)-this is required
  280. * if you pass your values as 32-bit quantities, as we do in this program
  281. formatString:
  282. dc.b '%ld + %ld = %ld (%lx hex)',10,0
  283.  
  284. END
  285. -------------------------
  286. Shared Libraries
  287. When someone refers to an Amiga library, they're usually talking about a
  288. shared library. The same is true of this book.
  289. As the name implies, a shared library is accessible to all Amiga programs.
  290. When you use a shared library function, its code does not become part of your
  291. program on disk; shared libraries are located in ROM (writable control memory
  292. on the Amiga 1000) or loaded into RAM from the libs directory of your Work-
  293. bench disk.
  294. Shared libraries are more memory conservative than linked libraries. Every
  295. program that accesses a function from a linked library must contain its own
  296. copy of that function. Only one copy of a shared library function ever needs to
  297. be in memory because all programs have access to it.
  298. At this writing, there are 15 libraries available with Kickstart/Workbench
  299. 1.3, each one covering a different aspect of the Amiga. For graphics program-
  300. ming, you use the graphics.library; for creating windows, requesters, and pull-
  301. down menus, you use the intuition.library; for disk access, you use the
  302. dos.library.
  303. The clist.library has been removed from Kickstart 1.2 and 1.3, but it is
  304. available with Kickstart 1.1 and is documented here for the sake of complete-
  305. ness. Two special libraries-romboot.library and version.library-are not cov-
  306. ered in this chapter since the functions they contain are private to the Amiga's
  307. system software and cannot be called by the user.
  308. -------------------------
  309. Opening and Closing Libraries
  310. A library must be opened before you can access its functions. Like your local
  311. Seven-Eleven store, the Exec library is always open. This works out rather well
  312. considering OpenLibrary( ), the one function required to open other libraries, is
  313. contained in Exec. When you link with startup code such as Lattice's c.o, the
  314. DOS library is opened for you as well. If you program with M2Sprint, you'll
  315. find that several libraries are automatically opened for you.
  316. You open a library using the aptly named OpenLibrary( ) function.
  317. OpenLibrary( ) expects two arguments: the library name and the library version
  318. number. (See Table 1-2 for a complete list of available libraries.) The sample
  319. code below shows the C, machine language, and Modula-2 syntax for using the
  320. OpenLibrary( ) function.
  321.  
  322. In C:
  323. libBase = OpenLibrary(libraryName,version);
  324.  
  325. In machine language:
  326. move.l ExecBase,a6    ;Pointer to ExecBase
  327. lea libraryName,a1    ;Pointer to the library's name goes in a1
  328. moveq #version,d0    ;Version number goes in d0
  329. jsr OpenLibrary(a6)    ;Open library and return libBase in d0
  330. move.l d0,libBase    ;Save library base pointer
  331.  
  332. In Modula-2:
  333. libBase := OpenLibrary(libraryName,version);
  334.  
  335. where libBase is the name of the library's base pointer, libraryName is the
  336. name of the library, and version is the lowest acceptable version of the library
  337. you require. In most cases, you should use a version number of 0 or 33. The
  338. following table explains all the possible version numbers you can use:
  339.  
  340. Table 1 1. Library Version Numbers
  341. Version Number    Kickstart Version
  342. 0        Any version
  343. 30        Kickstart version 1.0
  344. 31        NTSC Kickstart version 1.1
  345. 32        PAL Kickstart version 1.1
  346. 33        Kickstart 1.2 (the oldest version still supported)
  347. 34        Kickstart 1.3
  348.  
  349. If you specify a version that is higher than what is available on the Amiga
  350. you run your program, OpenLibrary( ) will fail and return a NULL value. If the
  351. library is opened successfully, the base address of the library is returned in libBase.
  352.  
  353.  
  354. Table 1-2 shows the library base pointer names (libBase) and their corre-
  355. sponding library names (libraryName) that you should use when opening a li-
  356. brary. In machine language, you can use practically any name you choose, as
  357. long as you define an area in memory to store the pointer and label that loca-
  358. tion using the name you select. By convention, it's recommended you use the
  359. library base pointer name provided in Table 1-2 and precede it with an under-
  360. line character, as in the name _DOSBase. In Lattice C, you must use the names
  361. given below. If you don't, your program will compile and link correctly, and
  362. then happily guru when it is run.
  363.  
  364. Table 1-2. Library Names
  365. Library Name            Library Base Pointer Name
  366. clist.library            ClistBase (unavailable in Kickstart 1.2 and 1.3)
  367. diskfont.library        DiskfontBase
  368. dos.library            DOSBase (normally opened by startup code)
  369. exec.library            ExecBase (ExecBase found at location 4)
  370. expansion.library        ExpansionBase
  371. graphics.library        GfxBase
  372. icon.library            IconBase
  373. intuition.library        IntuitionBase
  374. layers.library            LayersBase
  375. mathffp.library         MathBase
  376. mathieeedoubbas.library     MathleeeDoubBasBase
  377. mathieeedoubtrans.library    MathleeeDoubTransBase
  378. mathtrans.library        MathTransBase
  379. romboot.library         (system private-not accessible to user)
  380. translator.library        TranslatorBase
  381. version.library         (system private-not accessible to user)
  382.  
  383. When your program is finished, you must be sure to close all of the librar-
  384. ies you opened. To accomplish this you use yet another aptly named Exec
  385. function, CloseLibrary( ). The only argument that the CloseLibrary( ) function
  386. requires is the base address of the library you wish to close. This is the same
  387. base address that was returned by OpenLibrary( ). Here are some examples on
  388. using CloseLibrary( ):
  389.  
  390. In C and Modula-2 use:
  391. CloseLibrary(libBase);
  392.  
  393. In machine language:
  394. move.l libBase,a1    ;libBase goes in register a1
  395. move.l ExecBase,a6    ;Pointer to ExecBase goes in a6
  396. jsr CloseLibrary(a6)    ;Close the library
  397.  
  398.  
  399. If you neglect to close a library, you run the risk of wasting memory since
  400. the system will not know if it can throw out an unused, RAM-based library.
  401. -------------------------
  402. Calling Functions
  403. The end of this chapter contains an alphabetical listing of every user-accessible
  404. Amiga library function. Each table entry gives the function's name; a brief de-
  405. scription of that function; the library in which the function is contained; its
  406. negative offset from the library base (useful to the "take charge" machine lan-
  407. guage programmer); the Modula-2 module in which it is contained; its syntax;
  408. its C, machine language, and Modula-2 usage; a description of its arguments
  409. (sometimes referred to as parameters); and a description of the value (if any)
  410. that is returned by the function. For example, here's the entry for Intuition's
  411. OpenWindow( ) function:
  412.  
  413. OpenWindow
  414. Description:        opens an Intuition window
  415. Library:        intuition.library
  416. Offset:         -$00CC (-204)
  417. Modula-2 Module:    Intuition
  418. Syntax:         window = OpenWindow(newWindow)
  419. C:            struct Window *OpenWindow(struct NewWindow *)
  420. Machine Language:    d0 = OpenWindow(a0)
  421. Modula-2:        OpenWindow(VAR newWindow: NewWindow): WindowPtr
  422. Arguments:        newWindow = NewWindow structure that describes window to
  423.             open
  424. Result:         window = pointer to Window structure; NULL if unsuccessful
  425.  
  426. The Syntax section gives you a general idea of what the function expects
  427. and what it returns. If you look at the C description, you can see that
  428. OpenWindow( ) expects a pointer to a NewWindow structure and returns a
  429. pointer to a Window structure. The Machine Language description shows that
  430. the Window pointer should be placed in a0 and the pointer to the opened Win-
  431. dow is returned in d0 (all functions that return values return them in d0). For
  432. Modula-2, you can see you must pass the function a NewWindow structure
  433. and the value it returns is of type WindowPtr. The following C, machine lan-
  434. guage, and Modula-2 programs are examples of how you can use this infor-
  435. mation to open a window. Five library functions are used in these program:
  436. OpenLibrary( ), OpenWindow( ), Wait( ), CloseWindow( ), and CloseLibrary( ).
  437. -------------------------
  438. Program 1-2. C Window
  439.  
  440. C code that opens a window and waits for you to close it
  441.  
  442. #include <intuition/intuition.h> /* Include Intuition stuff */
  443.  
  444. struct IntuitionBase *IntuitionBase = NULL; /* Define IntuitionBase */
  445. struct Window *MyWindow = NULL; /* Define Window pointer */
  446. struct NewWindow MyNewWindow = { /* Set up NewWindow structure */
  447. 0,12,
  448. 200,100,
  449. -1 , -1 ,
  450. CLOSEWINDOW,
  451. WINDOWCLOSE | WINDOWDEPTH | WINDOWDRAG | WINDOWSIZING | ACTIVATE,
  452. NULL,
  453. NULL,
  454. "Close Me",
  455. NULL,
  456. NULL,
  457. 80,24,
  458. -1 , -1 ,
  459. WBENCHSCREEN
  460. };
  461.  
  462. void main()
  463.  
  464. /* Open intuition.library */
  465. if ((IntuitionBase=(struct IntuitionBase *)
  466. OpenLibrary("intuition.library",0))==NULL)
  467. exit(0);
  468.  
  469. /* Open window */
  470. if ((MyWindow=(struct Window *)OpenWindow(&MyNewWindow))==NULL) (
  471. CloseLibrary(IntuitionBase);
  472. exit(0);
  473.  
  474. /* Wait for user to click close box */
  475. Wait(l<<MyWindow->UserPort->mp SigBit);
  476.  
  477. CloseWindow(MyWindow); /* Close window */
  478. CloseLibrary(IntuitionBase); /* Close intuition.library */
  479. -------------------------
  480. Program 1-3. Machine Language Window
  481.  
  482. *Open a window and wait for user to close it
  483.  
  484. *Include Intuition stuff
  485. INCLUDE "intuition/intuition.i"
  486.  
  487. *Address that holds pointer to ExecBase (this is ALWAYS 4)
  488. ExecBase equ 4
  489.  
  490. * Hard-coded function offsets-no need to link with amiga.lib with these!
  491. OpenLibrary equ -552
  492. CloseLibrary equ -414
  493. OpenWindow equ -204
  494. CloseWindow equ -72
  495.  
  496.  
  497. Wait equ -318
  498.  
  499.    SECTION code,CODE
  500.  
  501. *Open intuition.library
  502.    movea.l #IntuitionName,a1    ;Library name in a1
  503.    move.l #0,d0         ;Version number in d0
  504.    movea.l ExecBase,a6        ;Pointer to ExecBase in a6
  505.    jsr OpenLibrary(a6)        ;Call OpenLibrary( )
  506.    move.l d0, IntuitionBase    ;Save intuition.library base
  507.    beq.s Abort2         ;Exit program if OpenLibrary fails
  508.  
  509. *Open a window
  510.    movea.l #MyNewWindow,a0    ;Pointer to NewWindow in a0
  511.    move.l IntuitionBase,a6    ;Pointer to IntuitionBase in a6
  512.    jsr OpenWindow(a6)        ;Call OpenWindow( )
  513.    move.l d0,MyWindow        ;Save pointer to newly opened window
  514.    beq.s Abort1         ;Exit program in OpenWindow fails
  515.  
  516. *Wait for user to click close box
  517. movea.l MyWindow,a0        ;Pointer to window's
  518. movea.l wd_UserPort(a0),a0    ;user port in a0
  519.    move.b MP SIGBIT(a0),d1    ;Window's signal bits
  520.    moveq.l #l,d0        ;Convert bit number to mask
  521.    lsl.l d1,d0            ;and place the result in d0
  522.    movea.l ExecBase,a6        ;Pointer to ExecBase in a6
  523.    jsr Wait(a6)         ;Call Wait( )
  524.  
  525. *Close the window
  526.    movea.l MyWindow,a0        ;Pointer to window in a0
  527.    move.l IntuitionBase,a6    ;Pointer to IntuitionBase in a6
  528.    jsr CloseWindow(a6)        ;Call CloseWindow( )
  529.  
  530. *Close intuition.library
  531. Abort1:
  532.    move.l IntuitionBase,a1    ;Pointer to IntuitionBase in a1
  533.    movea.l ExecBase,a6        ;Pointer to ExecBase in a6
  534.    jsr CloseLibrary(a6)     ;Call CloseLibrary( )
  535.  
  536. *Exit the program
  537. Abort2:
  538.    clr.l d0    ;Set return code
  539.    rts    ;Drop out of program
  540.  
  541. SECTION data,DATA
  542.  
  543. *NewWindow structure
  544. MyNewWindow:
  545. dc.w 0,12
  546. dc.w 200,100
  547. dc.b -1,-1
  548. dc.l CLOSEWINDOW
  549. dc.l WINDOWCLOSE|WINDOWDEPTH|WINDOWDRAG|WINDOWSIZING|ACTIVATE
  550. dc.l 0
  551. dc.l 0
  552. dc.l WindowTitle
  553. dc.l 0
  554. dc.l 0
  555. dc.w 80,24
  556. dc.w -1,-1
  557. dc.w WBENCHSCREEN
  558.  
  559.  
  560. IntuitionName:
  561. dc.b 'intuition.library',0 ;Library name
  562. WindowTitle:
  563.    dc.b 'Close Me',0    ;Text to appear in window's drag bar
  564.  
  565.    SECTION mem,BSS
  566.  
  567. _IntuitionBase:
  568.    ds.l l    ;Place to store IntuitionBase
  569. MyWindow
  570.    ds.l l    ;Place to store Window pointer
  571.  
  572. END
  573. -------------------------
  574. Program 1-4. Modula-2 Window
  575.  
  576. MODULE SharedLibExample;
  577. (* Modula-2 code that opens a window and waits for you to close it *)
  578.  
  579. FROM Intuition IMPORT NewWindow, WindowFlagSet, WindowFlags, IDCMPFlags,
  580. IDCMPFlagSet, ScreenFlagSet, WBenchScreen, WindowPtr, OpenWindow,
  581. CloseWindow;
  582. FROM SYSTEM IMPORT BYTE, ADR, ADDRESS;
  583. FROM Ports IMPORT WaitPort;
  584.  
  585. VAR
  586. newWindow: NewWindow;
  587. myWindowPtr: WindowPtr;
  588. dummy: ADDRESS;
  589.  
  590. BEGIN
  591.  
  592. (* Setup NewWindow structure *)
  593.  
  594. WITH newWindow DO
  595. LeftEdge := 0; TopEdge := 12;
  596. Width := 200; Height := 100;
  597. DetailPen := BYTE(0); BlockPen := BYTE(l);
  598. Title := ADR("Close Me");
  599. Flags := WindowFlagSet{Activate,WindowClose,WindowDepth,
  600. WindowDrag,WindowSizing};
  601. IDCMPFlags := IDCMPFlagSet{CloseWindowFlag};
  602. Type := WBenchScreen;
  603. FirstGadget := NIL;
  604. CheckMark := NIL;
  605. Screen := NIL;
  606. BitMap := NIL;
  607. MinWidth := 80; MinHeight := 24;
  608. MaxWidth := -1; MaxHeight
  609. END;
  610.  
  611. (* Try to open window *)
  612.  
  613. myWindowPtr := OpenWindow(ADR(newWindow));
  614.  
  615. IF myWindowPtr # NIL THEN
  616. dummy := WaitPort(myWindowPtr^.UserPort);
  617. CloseWindow(myWindowPtr);
  618. END;
  619. END SharedLibExample.
  620. -------------------------
  621. Machine Language and Function Offsets
  622. In machine language, library functions are called with a JSR using address indi-
  623. rect with displacement addressing mode, which generates the destination ad-
  624. dress from the contents of register a6. For example, our previous machine
  625. language window program contains the following instructions:
  626.  
  627. OpenWindow equ -552
  628.  
  629. move.l _IntuitionBase,a6 ;Pointer to IntuitionBase in a6
  630. jsr OpenWindow(a6) ;Call OpenWindow( )
  631.  
  632. The MOVE instruction puts the base address of the Intuition library in reg-
  633. ister a6. The label OpenWindow contains the offset of OpenWindow( ) function
  634. from the base address of Intuition. The JSR instruction combines the base ad-
  635. dress with the offset to produce an actual destination address. By putting the
  636. base address in a6, we also tell OpenWindow( ) where its current library base is.
  637. To tell you the truth, our machine language program is breaking a few
  638. rules because it hard codes the library offsets in the beginning of the program
  639. using EQU directives. Purists obtain their function offsets using XREF state-
  640. ments. If we were to program this "by the book," the above lines would read
  641. xref _LVOOpenLibrary
  642.  
  643. move.l _IntuitionBase,a6    ;Pointer to IntuitionBase in a6
  644. jsr _LVOOpenWindow(a6)        ;Call OpenWindow( )
  645.  
  646. so the OpenWindow( ) offset would be obtained at link time. All of the pro-
  647. gram's library calls could (and some would say, should) be coded this way.
  648. Where does the _LVOOpenLibrary offset come from? Besides containing
  649. linked library functions, amiga.lib also contains the function offsets for every
  650. Amiga library. That's why so many machine language programs must be linked
  651. with amiga.lib. If you use the XREF method, you must precede all function
  652. names with an _LVO in order for amiga.lib to recognize them. If you hard-
  653. code your offsets as we did in Program 1-3, however, you can call the func-
  654. tions whatever you like-you won't even have to take the time to link with
  655. amiga.lib (unless, of course, you used one of amiga.lib's linked library
  656. functions).
  657. -------------------------
  658. Final Notes
  659. There are a few macros included in the following function list. Accessing a
  660. macro is much like accessing a library function. In Modula-2, all supported
  661. macros are defined as standard procedures and placed into modules. With C
  662. and machine language, they are actual compiler/assembler macros that must be
  663. included in your source code. The include file, header file, and Modula-2 mod-
  664. ule that contains the macro definitions are included in the macro's table entry.
  665. A few last minute points should be made regarding the terminology used
  666. in the following list of functions: By convention, a NULL value is equivalent to
  667. 0. The Modula-2 equivalent of NULL is NIL, which is defined as ADDRESS(0).
  668. In C, TRUE represents a nonzero value (usually equal to 1) and FALSE equals
  669. 0. In Modula-2, TRUE and FALSE are elements of the type BOOLEAN. If you
  670. see an _fptr in a C usage description, it specifies a pointer to a function.
  671. The following table is mainly for reference purposes-it's a place you can
  672. look up information about any Amiga library function, quickly and easily. For
  673. more details about using a specific function, we suggest you refer to the auto-
  674. docs section of the Commodore-Amiga ROM Kernel Reference Manual.
  675.  
  676. -------------------------Functions Start Here-------------------------
  677. AbortIO
  678. Description:        attempts to abort an I/O request already in progress
  679. Library:        exec.library
  680. Offset:         -$01E0 (-480)
  681. Modula-2 Module:    IO
  682. Syntax:         error = AbortIO(ioRequest)
  683. C:            long AbortIO(struct IORequest *)
  684. Machine Language:    d0 = AbortIO(a1)
  685. Modula-2:        AbortIO(ioRequest: ADDRESS): LONGINT
  686. Arguments:        ioRequest = IORequest block containing I/O request to abort
  687. Result:         error = 0 if successful; nonzero error value if unsuccessful
  688. -------------------------
  689. ActivateGadget
  690. Description:        activates a string gadget so the user does not have to click in the
  691.             gadget box to bring up a cursor
  692. Library:        intuition.library
  693. Offset:         -$01CE (-462)
  694. Modula-2 Module:    Intuition
  695. Syntax:         success = ActivateGadget(gadget, window, requester)
  696. C:          long ActivateGadget(struct Gadget *, struct Window *, struct
  697. Requester *)
  698. Machine Language:    d0 = ActivateGadget(a0, a1, a2)
  699. Modula-2:        ActivateGadget(gadget: GadgetPtr; window: WindowPtr; request-
  700.             er: RequesterPtr): BOOLEAN
  701. Arguments:        gadget = string gadget to activate
  702.             window = window containing gadget
  703.             requester = requester to receive gadgets; NULL if gadgets are not
  704.             to be part of a requester
  705. Result:         success = TRUE if successful; FALSE if arguments are bogus
  706. -------------------------
  707. ActivateWindow
  708. Description:        activates a window
  709. Library:        intuition.library
  710. Offset:         -$01C2 (-450)
  711. Modula-2 Module:    Intuition
  712. Syntax:         ActivateWindow(window)
  713. C:            long ActivateWindow(struct Window *)
  714. Machine Language:    ActivateWindow(a0)
  715. Modula-2:        ActivateWindow(window: WindowPtr)
  716. Arguments:        window = window to activate
  717. Result:         none
  718. -------------------------
  719. AddAnimOb
  720. Description:        adds an AnimOb to the linked list of AnimObs
  721. Library:        graphics.library
  722. Modula-2 Module:    Gels
  723. Offset:         -$009C (-156)
  724. Syntax:         AddAnimOb(anOb, anKey, rastPort)
  725. C:            void AddAnimOb(struct AnimOb *, long, struct RastPort *)
  726. Machine Language:    AddAnimOb(a0, a1, a2)
  727. Modula-2:        AddAnimOb(anOb: AnimObPtr; anKey: ADDRESS; rastPort:
  728.             RastPortPtr)
  729. Arguments:        anOb = AnimOb structure to be added to list
  730.             anKey = address of pointer to the first AnimOb in the list
  731.             (anKey=NULL if none in list so far)
  732.             rastPort = RastPort structure
  733. Result:         none
  734. -------------------------
  735. AddBob
  736. Description:        adds a Bob to GEL list
  737. Library:        graphics.library
  738. Offset:         -$0060 (-96)
  739. Modula-2 Module:    Gels
  740. Syntax:         AddBob(bob, rastPort)
  741. C:            void AddBob(struct Bob *, struct RastPort *)
  742. Machine Language:    AddBob(a0, a1)
  743. Modula-2:        AddBob(bob: BobPtr; VAR rastPort: RastPortPtr)
  744. Arguments:        bob = Bob structure to be added to GEL list
  745.             rastPort = RastPort structure
  746. Result:         none
  747. -------------------------
  748. AddConfigDev
  749. Description:        adds a new ConfigDev structure to the system's list of configura-
  750.             tion devices
  751. Library:        expansion.library
  752. Offset:         -$001E (-30)
  753. Modula-2 Module:    ConfigVars
  754. Syntax:         AddConfigDev(configDev)
  755. C:            void AddConfigDev(long)
  756. Machine Language:    AddConfigDev(a0)
  757. Modula-2:        AddConfigDev(configDev: ConfigDevPtr)
  758. Arguments:        configDef = a valid ConfigDev structure
  759. Result:         none
  760. -------------------------
  761. AddDevice
  762. Description:        adds a device to the system
  763. Library:        exec.library
  764. Offset:         -$01B0 (-432)
  765. Modula-2 Module:    Devices
  766. Syntax:         AddDevice(device)
  767. C:            void AddDevice(struct Device *)
  768. Machine Language:    AddDevice(a1)
  769. Modula-2:        AddDevice(device: DevicePtr)
  770. Arguments:        device = initialized device node
  771. Result:         none
  772. -------------------------
  773. AddDosNode
  774. Description:        mounts a disk
  775. Library:        expansion.library
  776. Offset:         -$0096 (-150)
  777. Modula-2 Module:    Expansion
  778. Syntax:         AddDosNode(bootPri, flags, deviceNode)
  779. C:            void AddDosNode(long, long, struct dosNode *)
  780. Machine Language:    AddDosNode(d0, d1, a0)
  781. Modula-2:        AddDosNode(bootPri: INTEGER; flags: BITSET; deviceNode:
  782.             DeviceNodePtr): BOOLEAN
  783. Arguments:        bootPri = boot priority of disk-+5 for floppy disk, 0 for hard
  784.             disk,-5 for a network disk,-128 non-bootable device
  785.             flags = ADN_STARTPROC (1) to start handler process
  786.             immediately
  787.             dosNode = initialized device node, as returned by
  788.             MakeDosNode( )
  789. Result:         none
  790. -------------------------
  791. AddFont
  792. Description:        adds a font to the system
  793. Library:        graphics.library
  794. Offset:         -$01E0 (-480)
  795. Modula-2 Module:    Text
  796. Syntax:         AddFont(textFont)
  797. C:            void AddFont(struct TextFont *)
  798. Machine Language:    AddFont(a1)
  799. Modula-2:        AddFont(textFont: TextFontPtr)
  800. Arguments:        textFont = TextFont structure (in public RAM) to add
  801. Result:         none
  802. -------------------------
  803. AddFreeList
  804. Description:        adds memory to the free list
  805. Library:        icon.library
  806. Offset:         -$0048 (72)
  807. Modula-2 Module:    Icon
  808. Syntax:         status = AddFreeList(free, mem, len)
  809. C:            long AddFreeList(struct FreeList *, char *, long)
  810. Machine Language:    d0 = AddFreeList(a0, a1, a2)
  811. Modula-2:        AddFreeList(free: FreeListPtr; mem: ADDRESS; len:
  812.             LONGCARD): BOOLEAN
  813. Arguments:        free = FreeList structure
  814.             mem = memory to record
  815.             len = length of the memory to record
  816. Result:         status = nonzero value if the call succeeded
  817. -------------------------
  818. AddGadget
  819. Description:        adds gadget to window
  820. Library:        intuition.library
  821. Offset:         -$002A (-42)
  822. Modula-2 Module:    Intuition
  823. Syntax:         position = AddGadget(window, gadget, position)
  824. C:            long AddGadget(struct Window *, struct Gadget *, long)
  825. Machine Language:    d0 = AddGadget(a0, a1, d0)
  826. Modula-2:        AddGadget(window: WindowPtr; gadget: GadgetPtr; position:
  827.             INTEGER): INTEGER
  828. Arguments:        window = window to contain gadget
  829.             gadget = gadget to add
  830.             position = position in gadget list for new gadget; -1 for end of
  831.             list
  832. Result:         position = position where gadget is actually added
  833. -------------------------
  834. AddGList
  835. Description:        adds or inserts a gadget list to an existing gadget list
  836. Library:        intuition.library
  837. Offset:         -$01B6 (-438)
  838. Modula-2 Module:    Intuition
  839. Syntax:         position = AddGList(window, gadget, position, numGadgets,
  840.             requester)
  841. C:            long AddGList(struct Window *, Gadget *, long, long, struct
  842.             Requester *)
  843. Machine Language:    d0 = AddGList(a0, a1, d0, d1, a2)
  844. Modula-2:        AddGList(window: WindowPtr; gadget: GadgetPtr; position:
  845.             INTEGER; numGadgets: INTEGER; requester: RequesterPtr):
  846.             CARDINAL
  847.  
  848. Arguments:        window = window to receive gadgets
  849.             gadget = first gadget in new gadget list
  850.             position = position in existing gadget list where new gadget list
  851.             should be added
  852.             numGadgets = number of gadgets to add
  853.             requester = requester to receive gadgets; NULL if gadgets are not
  854.             to be part of a requester
  855. Result:         position = position where gadget list is actually added
  856. -------------------------
  857. AddHead
  858. Description:        inserts a node at the head of a list
  859. Library:        exec.library
  860. Offset:         -$00F0 (-240)
  861. Modula-2 Module:    Lists
  862. Syntax:         AddHead(list, node)
  863. C:            void AddHead(struct List *, struct Node *)
  864. Machine Language:    AddHead(a0, a1)
  865. Modula-2:        AddHead(list: ListPtr; VAR node: NodePtr)
  866. Arguments:        list = list header
  867.             node = node to insert
  868. Result:         none
  869. -------------------------
  870. AddIntServer
  871. Description:        adds an interrupt server to the system
  872. Library:        exec.library
  873. Offset:         -$00A8 (-168)
  874. Modula-2 Module:    Interrupts
  875. Syntax:         AddlntServer(intNum, interrupt)
  876. C:            void AddIntServer(long, struct Interrupt *)
  877. Machine Language:    AddIntServer(d0, a1)
  878. Modula-2:        AddIntServer(intNum: CARDINAL; interrupt: InterruptPtr)
  879. Arguments:        intNum = portia interrupt bit (0-4)
  880.             interrupt = interrupt server node
  881. Result:         none
  882. ------------------------
  883. AddLibrary
  884. Description:        adds a library to the system
  885. Library:        exec.library
  886. Offset:         -$018C (-396)
  887. Modula-2 Module:    Libraries
  888. Syntax:         AddLibrary(library)
  889. C:            void AddLibrary(struct Library *)
  890. Machine Language:    AddLibrary(a1)
  891. Modula-2:        AddLibrary(library:LibraryPtr)
  892. Arguments:        library = initialized Library structure
  893. Result:         none
  894. -------------------------
  895. AddMemList
  896. Description:        adds memory to the system's pool of free memory
  897. Library:        exec.library
  898. Offset:         -$026A (-618)
  899. Modula-2 Module:    Memory
  900. Syntax:         AddMemList(size, attributes, pri, base, name)
  901. C:            void AddMemList(long, long, long, char *, char *)
  902. Machine Language:    AddMemList(d0, d1, d2, a0, a1)
  903. Modula-2:        AddMemList(size: LONGCARD; attributes: MemReqSet; pri:
  904.             INTEGER; base: ADDRESS; name: STRPTR)
  905. Arguments:        size = size of memory block in bytes
  906.             attributes = type of memory-MEMF_PUBLIC, MEMF_CHIP,
  907.             MEMF_FAST, MEMB_CLEAR
  908.             pri = priority of memory-CHIP memory has a priority of -10;
  909.             16-bit expansion memory has a priority of 0
  910.             base = address of the first location in the memory block
  911.             name = name to be used in memory header; NULL for no name
  912. Result:         none
  913. -------------------------
  914. AddPort
  915. Description:        adds a message port to the system
  916. Library:        exec.library
  917. Offset:         -$0162 (-354)
  918. Modula-2 Module:    Ports
  919. Syntax:         AddPort(port)
  920. C:            void AddPort(struct MsgPort *)
  921. Machine Language:    AddPort(a1)
  922. Modula-2:        AddPort(port: MsgPortPtr)
  923. Arguments:        port = message port to add
  924. Result:         none
  925. -------------------------
  926. AddResouree
  927. Description:        adds a resource to the system
  928. Library:        exec.library
  929. Offset:         -$01E6 (-486)
  930. Modula-2 Module:    Resources
  931. Syntax:         AddResource(resource)
  932. C:            void AddResource(struct Resource *)
  933. Machine Language:    AddResource(a1)
  934. Modula-2:        AddResource(resource: ResourcePtr)
  935. Arguments:        resource = resource node
  936. Result:         none
  937. -------------------------
  938. AddSemaphore
  939. Description:        attaches a signal semaphore to the system
  940. Library:        exec.library
  941. Offset:         -$0258 (-600)
  942. Modula-2 Module:    Semaphores
  943. Syntax:         AddSemaphore(signalSemaphore)
  944. C:            void AddSemaphore(struct SignalSemaphore *)
  945. Machine Language:    AddSemaphore(a1)
  946. Modula-2:        AddSemaphore(signalSemaphore: SignalSemaphorePtr)
  947. Arguments:        signalSemaphore = initialized SignalSemaphore structure
  948. Result:         none
  949. -------------------------
  950. AddTail
  951. Description:        appends a node to the tail of a list
  952. Library:        exec.library
  953. Offset:         -$00F6 (-246)
  954. Modula-2 Module:    Lists
  955. Syntax:         AddTail(list, node)
  956. C:            void AddTail(struct List *, struct Node *)
  957. Machine Language:    AddTail(a0, a1)
  958. Modula-2:        AddTail(list: ListPtr; node: NodePtr)
  959. Arguments:        list = list header
  960.             node = node to insert
  961. Result:         none
  962. -------------------------
  963. AddTask
  964. Description:        adds a task to the system
  965. Library:        exec.library
  966. Offset:         -$011A (-282)
  967. Modula-2 Module:    Tasks
  968. Syntax:         AddTask(task, initialPC, finalPC)
  969. C:            void AddTask(struct Task *, char *, char *)
  970. Machine Language:    AddTask(a1, a2, a3)
  971. Modula-2:        AddTask(task: TaskPtr; initialPC, finalPC:ADDRESS)
  972. Arguments:        task = task control block
  973.             initialPC = initial entry point
  974.             finalPC = address of entry point of finalization code
  975. Result:         none
  976. -------------------------
  977. AddTOF
  978. Description:        adds a task to the TopOfFrame (vertical-blanking interval) inter-
  979.             rupt server chain
  980. Library:        amiga.lib (linked library)
  981. Modula-2 Module:    none
  982. Syntax:         AddTOF(i, p, a)
  983. C:            void AddTOF(struct Isrvstr *, APTR, APTR)
  984. Machine Language:    pea a
  985.             pea p
  986.             pea i
  987.             jsr _AddTOF
  988.             add.l #12,sp
  989. Modula-2:        not available
  990. Arguments:        i = Isrvstr structure
  991.             p = entry point of routine to call at every vertical blank
  992.             a = array of long words that will receive routine's arguments
  993. Result:         none
  994. -------------------------
  995. AddVSprite
  996. Description:        adds VSprite to GEL list
  997. Library:        graphics.library
  998. Offset:         -$0066 (-102)
  999. Modula-2 Module:    Gels
  1000. Syntax:         AddVSprite(vSprite, rastPort)
  1001. C:            void AddVSprite(struct VSprite *, struct RastPort *)
  1002. Machine Language:    AddVSprite(a0, a1)
  1003. Modula-2:        AddVSprite(vSprite: VSpritePtr; rastPort: RastPortPtr)
  1004. Arguments:        vSprite = initialized VSprite structure
  1005.             rastPort = RastPort structure
  1006. Result:         none
  1007. -------------------------
  1008. afp
  1009. Description:        converts an ASCII string into a fast floating point number
  1010. Library:        amiga.lib (linked library)
  1011. Modula-2 Module:    none
  1012. Syntax:         fnum = afp(string)
  1013. C:            float afp(char *)
  1014. Machine Language:    pea string
  1015.             jsr _afp ;fnum returned in d0/d1
  1016.             addq.l #4,sp
  1017. Modula-2:        not available; use ConvStrToReal in RealConversions module
  1018. Arguments:        string = string to convert
  1019. Result:         fnum = floating point equivalent of string arguments
  1020. -------------------------
  1021. Alert
  1022. Description:        alerts the user of a serious error
  1023. Library:        exec.library
  1024. Offset:         -$006C (-108)
  1025. Modula-2 Module:    Alerts
  1026. Syntax:         Alert(alertNum, flags)
  1027. C:            void Alert(long, char *)
  1028. Machine Language:    Alert(d7, a5)
  1029. Modula-2:        Alert(alertNum: LONGCARD; flags: LONGCARD)
  1030. Arguments:        alertNum = alert number
  1031.             flags = second part of Guru Meditation number (usually the ad-
  1032.             dress of the offending task)
  1033. Result:         none
  1034. -------------------------
  1035. AllocAbs
  1036. Description:        allocates a block of memory from a specified location
  1037. Library:        exec.library
  1038. Offset:         -$00CC (-204)
  1039. Modula-2 Module:     Memory
  1040. Syntax:         memoryBlock = AllocAbs(byteSize, location)
  1041. C:            void *AllocAbs(long, void *)
  1042. Machine Language:    d0 = AllocAbs(d0, a1)
  1043. Modula-2:        AllocAbs(byteSize: LONGCARD; location: ADDRESS): ADDRESS
  1044. Arguments:        byteSize = size of desired block in bytes
  1045.             location = address where the memory must be
  1046. Result:         memoryBlock = pointer to allocated block; NULL if unsuccessful
  1047. -------------------------
  1048. Allocate
  1049. Description:        allocates a block of memory
  1050. Library:        exec.library
  1051. Offset:         -$00BA (-186)
  1052. Modula-2 Module:    Memory
  1053. Syntax:         memoryBlock = Allocate(freeList, byteSize)
  1054. C:            void *Allocate(struct MemHeader *, long)
  1055. Machine Language:    d0 = Allocate(a0, d0)
  1056. Modula-2:        Allocate(freeList: MemHeaderPtr; byteSize: LONGCARD):
  1057.             ADDRESS
  1058. Arguments:        freeList = memory list header
  1059.             byteSize = size of desired block in bytes
  1060. Result:         memoryBlock = pointer to allocated block; NULL if unsuccessful.
  1061. -------------------------
  1062. AllocBoardMem
  1063. Description:        allocates expansion board memory
  1064. Library:        expansion.library
  1065. Offset:         -$002A (-42)
  1066. Modula-2 Module:    Expansion
  1067. Syntax:         startSlot = AllocBoardMem(slotSpec)
  1068. C:            long AllocBoardMem(long)
  1069. Machine Language:    d0 = AllocBoardMem(d0)
  1070. Modula-2:        AllocBoardMem(slotSpec: INTEGER): INTEGER
  1071. Arguments:        slotSpec = number of slots to allocate
  1072. Result:         startSlot = slot allocated; -1 if unsuccessful
  1073. ------------------------
  1074. AllocCList
  1075. Description:        allocates and initializes a clist
  1076. Library:        clist.library
  1077. Offset:         $0024 (-36)
  1078. Modula-2 Module:    none
  1079. Syntax:         cList = AllocCList(cLPool)
  1080. C:            long AllocCList(long)
  1081. Machine Language:    d0 = AllocCList(a1)
  1082. Modula-2:        not available
  1083. Arguments:        cLPool = initialized CListPool
  1084. Result:         cList = longword cList descriptor; negative if unsuccessful.
  1085. -------------------------
  1086. AllocConfigDev
  1087. Description:        allocates a ConfigDev structure
  1088. Library:        expansion.library
  1089. Offset:         -$0030 (-48)
  1090. Modula-2 Module:    ConfigVars
  1091. Syntax:         configDev = AllocConfigDev( )
  1092. C:            struct ConfigDev *AllocConfigDev(void)
  1093. Machine Language:    d0 = AllocConfigDev( )
  1094. Modula-2:        AllocConfigDev( ): ConfigDevPtr
  1095. Arguments:        none
  1096. Result:         configDef = a valid ConfigDev structure; NULL if unsuccessful
  1097. -------------------------
  1098. AllocEntry
  1099. Description:        allocates many regions of memory
  1100. Library:        exec.library
  1101. Offset:         -$00DE (-222)
  1102. Modula-2 Module:    Memory
  1103. Syntax:         memlist = AllocEntry(memlist)
  1104. C:            struct MemList *AllocEntry(stuct MemList *)
  1105. Machine Language:    d0 = AllocEntry(a0)
  1106. Modula-2:        AllocEntry(memList: MemListPtr): MemListPtr
  1107. Arguments:        memList = initialized cList pool
  1108. Result:         memList = different memList filled with allocated memory
  1109. ------------------------
  1110. AllocExpansionMem
  1111. Description:        allocates expansion memory
  1112. Library:        expansion.library
  1113. Offset:         -$0036 (-54)
  1114. Modula-2 Module:    Expansion
  1115. Syntax:         startSlot = AllocExpansionMem(numSlots, slotOffset)
  1116. C:            CPTR AllocExpansionMem(long, long)
  1117. Machine Language:    d0 = AllocExpansionMem(d0, d1)
  1118. Modula-2:        AllocExpansionMem(numSlots, slot Offset: INTEGER): INTEGER
  1119. Arguments:        numSlots = number slots to allocate
  1120.             slotOffset = boundary offset
  1121. Result:         startSlot = slot allocated; -1 if unsuccessful
  1122. -------------------------
  1123. AllocMem
  1124. Description:        allocates many regions of memory
  1125. Library:        exec.library
  1126. Offset:         -$00C6 (-198)
  1127. Modula-2 Module:    Memory
  1128. Syntax:         memoryBlock = AllocMem(byteSize, requirements)
  1129. C:            void *AllocMem(long, long)
  1130. Machine Language:    d0 = AllocMem(d0, d1)
  1131. Modula-2:        AllocMem(byteSize: LONGCARD; requirements: MemReqSet):
  1132.             ADDRESS
  1133. Arguments:        byteSize = size of desired block in bytes
  1134.             requirements = type of memory-MEMF_PUBLIC,
  1135.             MEMF_CHIP, MEMF_FAST, MEMB_CLEAR
  1136. Result:         memoryBlock = pointer to allocated block
  1137. -------------------------
  1138. AllocRaster
  1139. Description:        allocates space for a bit plane
  1140. Library:        graphics.library
  1141. Offset:         -$01EC (-492)
  1142. Modula-2 Module:    Rasters
  1143. Syntax:         raster = AllocRaster(width, height)
  1144. C:            PLANEPTR AllocRaster(long, long)
  1145. Machine Language:    d0 = AllocRaster(d0, d1)
  1146. Modula-2:        AllocRaster(width, height: CARDINAL): PlanePtr
  1147. Arguments:        width = width of bitplane in pixels
  1148.             height = height of bitplane in pixels
  1149. Result:         raster = pointer to allocated memory; NULL if unsuccessful
  1150. -------------------------
  1151. AllocRemember
  1152. Description:        calls AllocMem and creates a link node
  1153. Library:        intuition.library
  1154. Offset:         -$018C (-396)
  1155. Modula-2 Module:    Intuition
  1156. Syntax:         memoryBlock = AllocRemember(rememberKey, size, flags)
  1157. C:            char *AllocRemember(struct Remember *, long, long)
  1158. Machine Language:    d0 = AllocRemember(a0, d0, d1)
  1159. Modula-2:        AllocRemember(VAR rememberKey: RememberPrt; size:
  1160.             LONGCARD; flags: MemReqSet): ADDRESS
  1161. Arguments:        rememberKey = address of pointer to Remember structure
  1162.             size = size of desired block in bytes
  1163.             flags = type of memory-MEMF_PUBLIC, MEMF_CHIP,
  1164.             MEMF_FAST, MEMB_CLEAR
  1165. Result:         memoryBlock = pointer to allocated block
  1166. -------------------------
  1167. AllocSignal
  1168. Description:        allocates a signal bit
  1169. Library:        exec.library
  1170. Offset:         -$014A (-330)
  1171. Modula-2 Module:    Tasks
  1172. Syntax:         signalNum = AllocSignal(signalNum)
  1173. C:            long AllocSignal(long)
  1174. Machine Language:    d0 = AllocSignal(d0)
  1175. Modula-2:        AllocSignal(signalNum: SIGNAL): SIGNAL
  1176. Arguments:        signalNum = desired signal number (0-31); -1 for no preference
  1177. Result:         signalNum = signal number allocated; -1 if no signal is
  1178.             available
  1179. -------------------------
  1180. AllocTrap
  1181. Description:        allocates a processor trap vector
  1182. Library:        exec.library
  1183. Offset:         -$0156 (-342)
  1184. Modula-2 Module:    Tasks
  1185. Syntax:         trapNum = AllocTrap(trapNum)
  1186. C:            long AllocTrap(long)
  1187. Machine Language:    d0 = AllocTrap(d0)
  1188. Modula-2:        AllocTrap(trapNum: TRAP): TRAP
  1189. Arguments:        trapNum = desired trap number (0-15); -1 for no preference
  1190. Result:         trapNum = trap number allocated; -1 if no trap is available
  1191. -------------------------
  1192. AllocWBObject
  1193. Description:        allocates a Workbench object
  1194. Library:        icon.library
  1195. Offset:         -$0042 (-66)
  1196. Modula-2 Module:    none
  1197. Syntax:         object = AllocWBObject( )
  1198. C:            struct WBObject AllocWBObject(void)
  1199. Machine Language:    d0 = AllocWBObject( )
  1200. Modula-2:        not available
  1201. Arguments:        none
  1202. Result:         object = the WBObject; NULL if unsuccessful
  1203. -------------------------
  1204. AndRectRegion
  1205. Description:        performs a two-dimensional AND operation of a rectangle with a
  1206.             region, leaving the result in the region
  1207. Library:        graphics.library
  1208. Offset:         -$01F8 (-504)
  1209. Modula-2 Module:    Regions
  1210. Syntax:         AndRectRegion(region, rectangle)
  1211. C:            void AndRectRegion(struct Region *, struct Rectangle *)
  1212. Machine Language:    AndRectRegion(a0, a1)
  1213. Modula-2:        AndRectRegion(region: RegionPtr; rectangle: RectanglePtr)
  1214. Arguments:        region = Region structure
  1215.             rectangle = Rectangle structure
  1216. Result:         none
  1217. -------------------------
  1218. AndRegionRegion
  1219. Description:        performs a two-dimensional AND operation of one region with a
  1220.             second region, leaving the result in second region
  1221. Library:        graphics.library
  1222. Offset:         -$0270 (-624)
  1223. Modula-2 Module:    Regions
  1224. Syntax:         success = AndRegionRegion(region1, region2)
  1225. C:            long AndRegionRegion(struct Region *, struct Region *)
  1226. Machine Language:    d0 = AndRegionRegion(a0, a1)
  1227. Modula-2:        AndRegionRegion(region1, region2: RegionPtr): BOOLEAN
  1228. Arguments:        region1 = Region structure
  1229.             region2 = Region structure
  1230. Result: success =    TRUE if successful; FALSE if unsuccessful
  1231. -------------------------
  1232. Animate
  1233. Description:        processes every AnimOb in the current animation list
  1234. Library:        graphics.library
  1235. Offset:         -$00A2 (-162)
  1236. Modula-2 Module:    Gels
  1237. Syntax:         Animate(anKey, rastPort)
  1238. C:            void Animate(long, struct RastPort *)
  1239. Machine Language:    Animate(a0, a1)
  1240. Modula-2:        Animate(ankey: ADDRESS; rastPort: RastPortPtr)
  1241. Arguments:        anKey = address of variable that points to the head AnimOb
  1242.             rastPort = RastPort structure
  1243. Result:         none
  1244. -------------------------
  1245. AreaCircle (macro)
  1246. Description:        adds a circle to the list of points used to fill an area
  1247. C Include File:     include/graphics/gfxmacros.h
  1248. ML Include File:    none
  1249. Modula-2 Module:    Areas
  1250. Syntax:         error = AreaCircle(rastPort, cx, cy, radius)
  1251. C:            long AreaCircle(struct RastPort *, long, long, long)
  1252. Machine Language:    not available, use AreaEllipse
  1253. Modula-2:        AreaCircle(rp: RastPortPtr; cx, cy, radius: INTEGER): INTEGER
  1254. Arguments:        rastPort = RastPort structure
  1255.             cx = horizontal coordinate of circle's center
  1256.             cy = vertical coordinate of circle's center
  1257.             radius = circle's radius
  1258. Result:         error = 0 if successful; -1 if no room left in list of points
  1259. -------------------------
  1260. AreaDraw
  1261. Description:        adds a point to the list of points used to fill an area
  1262. Library:        graphics.library
  1263. Offset:         -$0102 (-258)
  1264. Modula-2 Module:    Areas
  1265. Syntax:         error = AreaDraw(rastPort, x, y)
  1266. C:            long AreaDraw(struct RastPort *, long, long)
  1267. Machine Language:    d0 = AreaDraw(a1, d0, d1)
  1268. Modula-2:        AreaDraw(rastPort: RastPortPtr; x, y: INTEGER): INTEGER
  1269. Arguments:        rastPort = RastPort structure
  1270.             x = horizontal coordinate of point
  1271.             y = vertical coordinate of point
  1272. Result:         error = 0 if successful; -1 if no room left in list of points
  1273. -------------------------
  1274. AreaEllipse
  1275. Description:        adds an ellipse to the list of points used to fill an area
  1276. Library:        graphics.library
  1277. Offset:         -$00BA (-186)
  1278. Modula-2 Module:    Areas
  1279. Syntax:         error = AreaEllipse(rastPort, cx, cy, a, b)
  1280. C:            long AreaEllipse(struct RastPort *, long, long, long, long)
  1281. Machine Language:    d0 = AreaEllipse(a1, d0, d1, d2, d3)
  1282. Modula-2:        AreaEllipse(rastPort: RastPortPtr; cx, cy, a, b: INTEGER):
  1283.             INTEGER
  1284. -------------------------
  1285. AttemptLockLayerRom
  1286. Description:        attempts to lock a Layer structure
  1287. Library:        graphics.library
  1288. Offset:         -$028E (-582)
  1289. Modula-2 Module:    Clip
  1290. Syntax:         success = AttemptLockLayerRom(layer)
  1291. C:            long AttemptLockLayerRom(struct Layer *)
  1292. Machine Language:    d0 = AttemptLockLayerRom(a5)
  1293. Modula-2:        AttemptLockLayerRom(layer: LayerPtr): BOOLEAN
  1294. Arguments:        layer = Layer structure to lock
  1295. Result:         success = TRUE if successful; FALSE if unsuccessful
  1296. -------------------------
  1297. AttemptSemaphore
  1298. Description:        attempts to obtain access to a SignalSemaphore structure
  1299. Library:        exec.library
  1300. Offset:         -$0240 (-576)
  1301. Modula-2 Module:    Semaphores
  1302. Syntax:         success = AttemptSemaphore(signalSemaphore)
  1303. C:            long AttemptSemaphore(struct SignalSemaphore *)
  1304. Machine Language:    d0 = AttemptSemaphore(a0)
  1305. Modula-2:        AttemptSemaphore(signalSemaphore: SignalSemaphorePtr):
  1306.             BOOLEAN
  1307. Arguments:        signalSemaphore = initialized SignalSemaphore structure
  1308. Result:         success = TRUE if successful; FALSE if another task is using
  1309.             specified SignalSemaphore structure
  1310. -------------------------
  1311. AutoRequest
  1312. Description:        automatically creates and gets a response from a requester
  1313. Library:        intuition.library
  1314. Offset:         -$015C (-348)
  1315. Modula-2 Module:    Intuition
  1316. Syntax:         response = AutoRequest(window, bodyText, positiveText,
  1317.             negativeText, positiveFlags, negativeFlags, width, height)
  1318. C:            long AutoRequest(struct Window *, struct IntuiText *, struct
  1319.             IntuiText *, struct IntuiText *, long, long, long)
  1320. Machine Language:    d0 = AutoRequest(a0, a1, a2, a3, d0, d1, d2, d3)
  1321. Modula-2:        AutoRequest(window: WindowPtr; bodyText, positiveText,
  1322.             negativeText: IntuiTextPtr; positiveFlags, negativeFlags:
  1323.             IDCMPFlagsSet; width, height: INTEGER): BOOLEAN
  1324. Arguments:        window = Window structure
  1325.             bodyText = IntuiText structure
  1326.             positiveText = IntuiText structure
  1327.             negativeText = IntuiText structure
  1328.             positiveFlags = flags for the IDCMP
  1329.             negativeFlags = flags for the IDCMP
  1330.             width = width of requester
  1331.             height = height of requester
  1332. Result:         response = TRUE for a positive response; FALSE for a negative
  1333.             response
  1334. -------------------------
  1335. AvailFonts
  1336. Description:        builds an array of all available fonts on disk and/or in memory
  1337. Library:        diskfont.library
  1338. Offset:         -$0024 (-36)
  1339. Modula-2 Module:    DiskFont
  1340. Syntax:         error = AvailFonts(buffer, bufBytes, types)
  1341. C:            long AvailFonts(char *, long, long)
  1342. Machine Language:    d0 = AvailFonts(a0, d0, d1)
  1343. Modula-2:        AvailFonts(buffer: ADDRESS; bufBytes: LONGCARD; types:
  1344.             AFTypeSet): LONGCARD
  1345. Arguments:        buffer = memory buffer used to hold the array
  1346.             bufBytes = size of buffer in bytes
  1347.             types = type of fonts to search for-AFF_MEMORY and/or
  1348.             AFF_DISK
  1349. Result:         error = 0 if successful, otherwise, error contains the number of
  1350.             additional bytes that must be added to the buffer size (bufBytes)
  1351.             to contain all of the font information
  1352. -------------------------
  1353. AvailMem
  1354. Description:        returns memory available given certain requirements
  1355. Library:        exec.library
  1356. Offset:         -$00D8 (-216)
  1357. Modula-2 Module:    Memory
  1358. Syntax:         size = AvailMem(requirements)
  1359. C:            long AvailMem(long)
  1360. Machine Language:    d0 = AvailMem(d1)
  1361. Modula-2:        AvailMem(requirements: MemReqSet): LONGCARD
  1362. Arguments:        requirements = type of memory required-MEMF_PUBLIC,
  1363.             MEMF_CHIP, MEMF_FAST, MEMB_CLEAR
  1364. Result:         size = total free space remaining
  1365. ------------------------- MISSING IN ORIGINAL TEXT!!!! -------------------------
  1366. Arguments:        rastPort = RastPort structure
  1367.             cx = horizontal coordinate of ellipse's center
  1368.             cy = vertical coordinate of ellipse's center
  1369.             a = horizontal radius of ellipse (must be greater than O)
  1370.             b = vertical radius of ellipse (must be greater than O)
  1371. Result:         error = 0 if successful; -1 if no room left in list of points
  1372. -------------------------
  1373. AreaEnd
  1374. Description:        fills an area using a list of vertices
  1375. Library:        graphics.library
  1376. Offset:         -$0108 (-264)
  1377. Modula-2 Module:    Areas
  1378. Syntax:         error = AreaEnd(rastPort)
  1379. C:            long AreaEnd(struct RastPort *)
  1380. Machine Language:    d0 = AreaEnd(a1)
  1381. Modula-2:        AreaEnd(rastPort: RastPortPtr): INTEGER
  1382. Arguments:        rastPort = RastPort structure
  1383. Result:         error = 0 if successful; -1 if unsuccessful
  1384. -------------------------
  1385. AreaMove
  1386. Description:        closes the current polygon described by a table of vertices and de-
  1387.             fines the starting point for a new polygon
  1388. Library:        graphics.library
  1389. Offset:         -$00FC (-252)
  1390. Modula-2 Module:    Areas
  1391. Syntax:         error = AreaMove(rastPort, x, y)
  1392. C:            long AreaMove(struct RastPort *, long, long)
  1393. Machine Language:    d0 = AreaMove(a1, d0, d1)
  1394. Modula-2:        AreaMove(rastPort: RastPortPtr; x, y: INTEGER): INTEGER
  1395. Arguments:        rastPort = RastPort structure
  1396.             x = horizontal coordinate of point
  1397.             y = vertical coordinate of point
  1398. Result:         error = 0 if successful; -1 if no room left in list of points
  1399. -------------------------
  1400. arnd
  1401. Description:        rounds a floating point number contained in an ASCII string
  1402. Library:        amiga.lib (linked library)
  1403. Modula-2 Module:    none
  1404. Syntax:         arnd(place, exp, string)
  1405. C:            void arnd(long, long, char *)
  1406. Machine Language:    pea string
  1407.             move.l #exp,-(sp)
  1408.             move.l #place,-(sp)
  1409.             jsr _arnd        ;string contents are modified
  1410.             add.l #12,sp
  1411. Modula-2:        not available
  1412. Arguments:        place = number of desired decimal places
  1413.             exp = exponent value of number in string argument
  1414.             string = string containing number to round
  1415. Result:         string argument is modified to contain rounded number
  1416. -------------------------
  1417. AskFont
  1418. Description:        puts text attributes of the current font in the specified TextAttr
  1419.             structure
  1420. Library:        graphics.library
  1421. Offset:         -$01DA (-474)
  1422. Modula-2 Module:    Text
  1423. Syntax:         AskFont(rastPort, textAttr)
  1424. C:            void AskFont(struct RastPort *, struct TextAttr *)
  1425. Machine Language:    AskFont(a1, a0)
  1426. Modula-2:        AskFont(rastPort: RastPortPtr; textAttr: TextAttrPtr)
  1427. Arguments:        rastPort = RastPort structure
  1428.             textAttr = TextAttr structure to be filled
  1429. Result:         returns results in textAttr argument
  1430. -------------------------
  1431. AskSoftStyle
  1432. Description:        returns the soft style bits of the current font
  1433. Library:        graphics.library
  1434. Offset:         -$0054 (-84)
  1435. Modula-2 Module:    Text
  1436. Syntax:         enable = AskSoftStyle(rastPort)
  1437. C:            long AskSoftStyle(struct RastPort *)
  1438. Machine Language:    d0 = AskSoftStyle(a1)
  1439. Modula-2:        AskSoftStyle(rastPort: RastPortPtr): FontStyleSet
  1440. Arguments:        rastPort = RastPort structure
  1441. Result:         enable = valid style bits
  1442. -------------------------
  1443. BeginIO
  1444. Description:        initiates an IO request like SendIO( ), but does not clear io_Flags
  1445.             field
  1446. Library:        amiga.lib (linked library)
  1447. Modula-2 Module:    IO
  1448. Syntax:         BeginIO(ioRequest)
  1449. C:            void BeginIO(struct IORequest *)
  1450. Machine Language:    pea ioRequest
  1451.             jsr _BeginIO
  1452.             addq.l #4,sp
  1453. Modula-2:        BeginIO(ioRequest: ADDRESS)
  1454. Arguments:        IORequest = initialized IORequest structure
  1455. Result:         none
  1456. -------------------------
  1457. BeginRefresh
  1458. Description:        sets up a window for optimized refreshing
  1459. Library:        intuition.library
  1460. Offset:         -$0162 (-354)
  1461. Modula-2 Module:    Intuition
  1462. Syntax:         BeginRefresh(window)
  1463. C:            void BeginRefresh(struct Window *)
  1464. Machine Language:    BeginRefresh(a0)
  1465. Modula-2:        BeginRefresh(window: WindowPtr)
  1466. Arguments:        window = window that needs updating
  1467. Result:         none
  1468. -------------------------
  1469. BeginUpdate
  1470. Description:        prepares to repair a damaged layer
  1471. Library:        layers.library
  1472. Offset:         -$004E (-78)
  1473. Modula-2 Module:    Layers
  1474. Syntax:         success = BeginUpdate(layer)
  1475. C:            long BeginUpdate(struct Layer *)
  1476. Machine Language:    d0 = BeginUpdate(a0)
  1477. Modula-2:        BeginUpdate(layer: LayerPtr): BOOLEAN
  1478. Arguments:        layer = Layer to be repaired
  1479. Result:         TRUE if successful; FALSE if unsuccessful
  1480. -------------------------
  1481. BehindLayer
  1482. Description:        moves a layer behind other layers
  1483. Library:        layers.library
  1484. Offset:         -$0036 (-54)
  1485. Modula-2 Module:    Layers
  1486. Syntax:         success = BehindLayer(dummy, layer)
  1487. C:            long BehindLayer(struct Layer_Info, struct Layer *)
  1488. Machine Language:    d0 = BehindLayer(a0, a1)
  1489. Modula-2:        BehindLayer(layer: LayerPtr): BOOLEAN
  1490. Arguments:        dummy = unused
  1491.             layer = Layer to move behind other layers
  1492. Result:         success = TRUE if successful; FALSE if unsuccessful
  1493. -------------------------
  1494. BltBitMap
  1495. Description:        uses the blitter chip to move (blit) a rectangular region of bits from
  1496.             a BitMap to a BitMap
  1497. Library:        graphics.library
  1498. Offset:         -$001E (-30)
  1499. Modula-2 Module:    Blitter
  1500. Syntax:         planes = BltBitMap(scrBitMap, srcX, srcY, destBitMap, destX,
  1501.             destY, sizeX, sizeY, miniterm, mask, tempA)
  1502.  
  1503. C:            long BltBitMap(struct BitMap *, long, long, struct BitMap *, long,
  1504.             long, long, long, long, long, char *)
  1505. Machine Language:    d0 = BltBitMap(a0, d0, d1, a1, d2, d3, d4, d5, d6, d7, a2)
  1506. Modula-2:        BltBitMap(scrBitMap: BitMapPtr; srcX, srcY: INTEGER;
  1507.             destBitMap: BitMapPtr; destX, destY: INTEGER; sizeX, sizeY:
  1508.             INTEGER; miniterm: BYTE; mask: BITSET; tempA: ADDRESS):
  1509.             LONGCARD
  1510. Arguments:        scrBitMap = source BitMap structure
  1511.             srcX = horizontal coordinate of upper left corner of source
  1512.             rectangle
  1513.             srcY = vertical coordinate of upper left corner of source rectangle
  1514.             destBitMap = destination BitMap structure
  1515.             destX = horizontal coordinate of upper left corner of destination
  1516.             rectangle
  1517.             destY = vertical coordinate of upper left corner of destination
  1518.             rectangle
  1519.             sizeX = width of rectangle
  1520.             sizeY = height of rectangle
  1521.             miniterm = logic function to apply to rectangle
  1522.             mask = bit planes to be affected
  1523.             tempA = pointer to chip memory for one source line or NULL
  1524. Result:         planes = actual number of planes involved in blit
  1525. -------------------------
  1526. BltBltMapRastPort
  1527. Description:        moves a rectangular region from a BitMap to a RastPort
  1528. Library:        graphics.library
  1529. Offset:         -$025E (-606)
  1530. Modula-2 Module:    Blitter
  1531. Syntax:         BltBitMapRastPort(srcBitMap, srcX, srcY, destRastPort, destX,
  1532.             destY, sizeX, sizeY, miniterm)
  1533. C:            void BltBitMapRastPort(struct BitMap *, long, long, struct RastPort
  1534.             *, long, long, long, long, long)
  1535. Machine Language:    BltBitMapRastPort(a0, d0, d1, a1, d2, d3, d4, d5, d6)
  1536. Modula-2:        BltBitMapRastPort(srcBitMap: BitMapPtr; srcX, srcY: INTEGER;
  1537.             destRastPort: RastPortPtr; destX, destY: INTEGER; sizeX, sizeY:
  1538.             INTEGER; miniterm: BYTE)
  1539. Arguments:        srcBitMap = source BitMap structure
  1540.             srcX = horizontal coordinate of upper left corner of source
  1541.             rectangle
  1542.             srcY = vertical coordinate of upper left corner of source rectangle
  1543.             destRastPort = destination RastPort structure
  1544.             destX = horizontal coordinate of upper left corner of destination
  1545.             rectangle
  1546.             destY = vertical coordinate of upper left corner of destination
  1547.             rectangle
  1548.             sizeX = width of rectangle
  1549.             sizeY = height of rectangle
  1550.             miniterm = logic function to apply to rectangle
  1551. Result:         none
  1552. -------------------------
  1553. BltClear
  1554. Description:        fills a section of chip memory with zeros
  1555. Library:        graphics.library
  1556. Offset:         -$012C (-300)
  1557. Modula-2 Module:    Blitter
  1558. Syntax:         BltClear(memBlock, byteCount, flags)
  1559. C:            void BltClear(char *, long, long)
  1560. Machine Language:    BltClear(a1, d0, d1)
  1561. Modula-2:        BltClear(memBlock: ADDRESS; byteCount: LONGCARD; flags:
  1562.             BltClearFlagSet)
  1563.  
  1564. Arguments:        memBlock = memory to clear (must start on a word boundary)
  1565.             byteCount = number of bytes to clear
  1566.             flags = set bit 0 to force function to wait until memory is cleared;
  1567.             set bit 1 if byteCount is to be interpreted as the number of rows
  1568.             and bytes per row to clear; clear bit 1 if byteCount is to be inter-
  1569.             preted as an even number of bytes
  1570. Result:         none
  1571. -------------------------
  1572. BltMaskBitMapRastPort
  1573. Description:        moves a rectangular region from a BitMap to a RastPort through a
  1574.             mask
  1575. Library:        graphics.library
  1576. Offset:         -$027C (-636)
  1577. Modula-2 Module:    Blitter
  1578. Syntax:         BltMaskBitMapRastPort(srcBitMap, srcX, srcY, destRastPort, destX,
  1579.             destY, sizeX, sizeY, miniterm, mask)
  1580. C:            void BltMaskBitMapRastPort(struct BitMap *, long, long, struct
  1581.             RastPort *, long, long, long, long, long, APTR)
  1582. Machine Language:    BltMaskBitMapRastPort(a0, d0, d1, a1, d2, d3, d4, d5, d6, a2)
  1583. Modula-2:        BltMaskBitMapRastPort(srcBitMap: BitMapPtr; srcX, srcY: INTE-
  1584.             GER; destRastPort: RastPortPtr; destX, destY: INTEGER; sizeX,
  1585.             sizeY: INTEGER; miniterm: BYTE; mask: PlanePtr)
  1586. Arguments:        srcBitMap = source BitMap structure
  1587.             srcX = horizontal coordinate of upper left corner of source
  1588.             rectangle
  1589.             srcY = vertical coordinate of upper left corner of source rectangle
  1590.             destRastPort = destination RastPort structure
  1591.             destX = horizontal coordinate of upper left corner of destination
  1592.             rectangle
  1593.             destY = vertical coordinate of upper left corner of destination
  1594.             sizeX = width of rectangle
  1595.             sizeY = height of rectangle
  1596.             miniterm = logic function to apply to rectangle
  1597.             mask = pointer to bit-plane mask
  1598. Result:         none
  1599. -------------------------
  1600. BltPattern
  1601. Description:        draws through a mask using standard drawing rules
  1602. Library:        graphics.library
  1603. Offset:         -$0138 (-312)
  1604. Modula-2 Module:    Blitter
  1605. Syntax:         BltPattern(destRastPort, pattern, x1, y1, x2, y2, width)
  1606. C:            void BltPattern(struct RastPort *, struct RastPort *, long, long,
  1607.             long, long, long)
  1608. Machine Language:    BltPattern(a1, a0, d0, d1, d2, d3, d4)
  1609. Modula-2:        BltPattern(destRastPort: RastPortPtr; pattern: ADDRESS; x1, y1:
  1610.             INTEGER; x2, y2: INTEGER; width: INTEGER)
  1611. Arguments:        destRastPort = destination RastPort
  1612.             pattern = two-dimensional mask pattern
  1613.             x1 = horizontal coordinate of upper left corner in destination
  1614.             RastPort
  1615.             y1 = vertical coordinate of upper left corner in destination
  1616.             RastPort
  1617.             x2 = horizontal coordinate of lower right corner in destination
  1618.             RastPort
  1619.             y2 = vertical coordinate of lower right corner in destination
  1620.             RastPort
  1621.             width = width of mask in bytes
  1622. Result:         none
  1623. -------------------------
  1624. BltTemplate
  1625. Description:        "cookie cuts" a shape in a rectangle to a RastPort
  1626. Library:        graphics.library
  1627. Offset:         -$0024 (-36)
  1628. Modula-2 Module:    Blitter
  1629. Syntax:         BltTemplate(source, srcX, srcMod, destRastPort, destX, destY,
  1630.             sizeX, sizeY)
  1631. C:            void BltTemplate(char *, long, long, struct RastPort *, long, long,
  1632.             long, long)
  1633. Machine Language:    BltTemplate(a0, d0, d1, a1, d2, d3, d4, d5)
  1634. Modula-2:        BltTemplate(source: PlanePTR; srcX, srcMod: INTEGER;
  1635.             destRastPort: RastPortPtr; destX, destY: INTEGER; sizeX, sizeY:
  1636.             INTEGER) (changes)
  1637. Arguments:        source = template mask
  1638.             srcX = horizontal offset into template mask (0-15)
  1639.             srcMod = number of bytes per row in template mask
  1640.             destRastPort = destination RastPort
  1641.             destX = horizontal coordinate of upper left corner in destination
  1642.             RastPort
  1643.             destY = vertical coordinate of upper left corner in destination
  1644.             RastPort
  1645.             sizeX = width of rectangular template
  1646.             sizeY = height of rectangular template
  1647. Result:         none
  1648. -------------------------
  1649. BNDRYOFF (macro)
  1650. Description:        turns boundary mode off
  1651. C Include File:     include/graphics/gfxmacros.h
  1652. ML Include File:    none
  1653. Modula-2 Module:    Pens
  1654. Syntax:         BNDRYOFF(rastPort)
  1655. C:            void BNDRYOFF(struct RastPort *)
  1656. Machine Language:    not available
  1657. Modula-2:        BNDRYOFF(rastPort: RastPortPtr)
  1658. Arguments:        rastPort = RastPort structure
  1659. Result:         none
  1660. -------------------------
  1661. BuildSysRequest
  1662. Description:        builds and displays a system requester
  1663. Library:        intuition.library
  1664. Offset:         -$0168 (-360)
  1665. Modula-2 Module:    Intuition
  1666. Syntax:         window = BuildSysRequest(window, bodyText, positiveText,
  1667.             negativeText, flags, width, height)
  1668. C:            struct Window *BuildSysRequest(struct Window *, struct IntuiText
  1669.             *, struct IntuiText *, struct IntuiText *, long, long, long)
  1670. Machine Language:    d0 = BuildSysRequest(a0, a1, a2, a3, d0, d1, d2)
  1671. Modula-2:        BuildSysRequest(window: WindowPtr; bodyText, positiveText,
  1672.             negativeText: IntuiTextPtr; flags: IDCMPFlagsSet; width, height:
  1673.             INTEGER): ADDRESS
  1674. Arguments:        window = Window to contain requester
  1675.             bodyText = IntuiText structure containing requester's main text
  1676.             positiveText = IntuiText structure containing text for positive
  1677.             gadget
  1678.             negativeText = IntuiText structure containing text for negative
  1679.             gadget
  1680.             flags = IDCMP flags for initialization of window containing
  1681.             requester
  1682.             width = requester width
  1683.             height = requester height
  1684. Result:         window = pointer to window containing requester; if requester
  1685.             could not be opened, DisplayAlert( ) is called and this function re-
  1686.             turns TRUE if the left mouse button is pressed and FALSE if the
  1687.             right mouse button is pressed
  1688. -------------------------
  1689. BumpRevision
  1690. Description:        creates a new name for the copy of a file, directory, or disk
  1691. Library:        icon.library
  1692. Offset:         -$006C (-108)
  1693. Modula-2 Module:    Icon
  1694. Syntax:         newname = BumpRevision(newbuf, oldname)
  1695. C:            long BumpRevision(char *, char *)
  1696. Machine Language:    d0 = BumpRevision(a0, a1)
  1697. Modula-2:        BumpRevision(newbuf, oldname: STRPTR)
  1698. Arguments:        newbuf = buffer to contain the new name (must be at least 31
  1699.             characters long)
  1700.             oldname = old name
  1701. Result:         newname = pointer to the new name contained in newbuf
  1702. -------------------------
  1703. Cause
  1704. Description:        causes a software interrupt
  1705. Library:        exec.library
  1706. Offset:         -$00B4 (-180)
  1707. Modula-2 Module:    Interrupts
  1708. Syntax:         Cause(interrupt)
  1709. C:            void Cause(struct Interrupt *)
  1710. Machine Language:    Cause(a1)
  1711. Modula-2:        Cause(interrupt: InterruptPtr)
  1712. Arguments:        interrupt = initialized interrupt node
  1713. Result:         none
  1714. -------------------------
  1715. CBump
  1716. Description:        moves to the next position in user copper list
  1717. Library:        exec.library
  1718. Offset:         -$016E (-366)
  1719. Modula-2 Module:    Copper
  1720. Syntax:         CBump(copList)
  1721. C:            void CBump(struct UCopList *)
  1722. Machine Language:    CBump(a1)
  1723. Modula-2:        CBump(copList: UCopListPtr)
  1724. Arguments:        copList = UCopList structure
  1725. Result:         none
  1726. -------------------------
  1727. CEND (macro)
  1728. Description:        adds the final instruction to a user copper list
  1729. C Include File:     include/graphics/gfxmacros.h
  1730. ML Include File:    none
  1731. Modula-2 Module:    Copper
  1732. Syntax:         CEND(copList)
  1733. C:            void CEND(struct UCopList *)
  1734. Machine Language:    not available
  1735. Modula-2:        CEND(VAR copList: UCopList)
  1736. Arguments:        copList = UCopList structure
  1737. Result:         none
  1738. ------------------------
  1739. ChangeSprite
  1740. Description:        changes the shape of a sprite
  1741. Library:        graphics.library
  1742. Offset:         -$01A4 (-420)
  1743. Modula-2 Module:    Sprites
  1744. Syntax:         ChangeSprite(viewPort, simpleSprite, newdata)
  1745. C:            void ChangeSprite(struct ViewPort *, struct SimpleSprite *, short *)
  1746. Machine Language:    ChangeSprite(a0, a1, a2)
  1747. Modula-2:        ChangeSprite(viewPort: ViewPortPtr; simpleSprite:
  1748.             SimpleSpritePtr; newdata: ADDRESS)
  1749. Arguments:        viewPort = ViewPort structure
  1750.             simpleSprite = initialized SimpleSprite structure
  1751.             newdata = table of sprite shape data
  1752. Result:         none
  1753. -------------------------
  1754. CheckIO
  1755. Description:        gets the status of an IO request
  1756. Library:        exec.library
  1757. Offset:         -$01D4 (-468)
  1758. Modula-2 Module:    IO
  1759. Syntax:         status = CheckIO(ioRequest)
  1760. C:            long CheckIO(struct IORequest *)
  1761. Machine Language:    d0 = CheckIO(a1)
  1762. Modula-2:        CheckIO(ioRequest: ADDRESS): ADDRESS
  1763. Arguments:        ioRequest = IORequest block
  1764. Result:         status = NULL if I/O is still in progress; pointer to IORequest
  1765.             block if I/O has completed
  1766. -------------------------
  1767. CINIT (macro)
  1768. Description:        initializes a user copper list
  1769. C Include File:     include/graphics/gfxmacros.h
  1770. ML Include File:    none
  1771. Modula-2 Module:    Copper
  1772. Syntax:         copList = CINIT(copList, num)
  1773. C:            struct UCopList *CINIT(struct UCopList *, short)
  1774. Machine Language:    not available
  1775. Modula-2:        CINIT(copList: UCopListPtr; num: CARDINAL): UCopListPtr
  1776. Arguments:        copList = UCopList structure
  1777.             num = number of instructions buffer must hold
  1778. Result:         copList = pointer to an initialized UCopList structure, ready to
  1779.             accept copper instructions
  1780. -------------------------
  1781. ClearDMRequest
  1782. Description:        clears the DMRequest of a window
  1783. Library:        intuition.library
  1784. Offset:         -$0030 (-48)
  1785. Modula-2 Module:    Intuition
  1786. Syntax:         success = ClearDMRequest(window)
  1787. C:            long ClearDMRequest(struct Window *)
  1788. Machine Language:    d0 = ClearDMRequest(a0)
  1789. Modula-2:        ClearDMRequest(window: WindowPtr): BOOLEAN
  1790. Arguments:        window = window from which DMRequest is to be cleared
  1791. Result:         success = TRUE if successful; FALSE if unsuccessful (DMRequest
  1792.             is still in use)
  1793. -------------------------
  1794. ClearEOL
  1795. Description:        clears from the current position to the end of the line
  1796. Library:        graphics.library
  1797. Offset:         -$002A (-42)
  1798. Modula-2 Module:    Text
  1799. Syntax:         ClearEOL(rastPort)
  1800. C:            void ClearEOL(struct RastPort *)
  1801. Machine Language:    ClearEOL(a1)
  1802. Modula-2:        ClearEOL(rastPort: RastPortPtr)
  1803. Arguments:        rastPort = RastPort structure to clear
  1804. Result:         none
  1805. -------------------------
  1806. ClearMenuStrip
  1807. Description:        clears (detaches) a window's menu strip
  1808. Library:        intuition.library
  1809. Offset:         -$0036 (-54)
  1810. Modula-2 Module:    Intuition
  1811. Syntax:         ClearMenuStrip(window)
  1812. C:            void ClearMenuStrip(struct Window *)
  1813. Machine Language:    ClearMenuStrip(a0)
  1814. Modula-2:        ClearMenuStrip(window: WindowPtr)
  1815. Arguments:        window = Window structure
  1816. Result:         none
  1817. -------------------------
  1818. ClearPointer
  1819. Description:        returns the mouse pointer to its default shape
  1820. Library:        intuition.library
  1821. Offset:         -$003C (-60)
  1822. Modula-2 Module:    Intuition
  1823. Syntax:         ClearPointer(region)
  1824. C:            void ClearPointer(struct Region *)
  1825. Machine Language:    ClearPointer(a0)
  1826. Modula-2:        ClearPointer(window: WindowPtr)
  1827. Arguments:        window = Window structure
  1828. Result:         none
  1829. -------------------------
  1830. ClearRectRegion
  1831. Description:        performs a two-dimensional clearing operation of a clipping rec
  1832.             tangle with a region, leaving the result in the region
  1833. Library:        graphics.library
  1834. Offset:         -$020A (-522)
  1835. Modula-2 Module:    Regions
  1836. Syntax:         success = ClearRectRegion(region, rectangle)
  1837. C:            long ClearRectRegion(struct Region *, struct Rectangle *)
  1838. Machine Language:    d0 = ClearRectRegion(a0, a1)
  1839. Modula-2:        ClearRectRegion(region: RegionPtr; rectangle: RectanglePtr):
  1840.             BOOLEAN
  1841. Arguments:        region = Region to clear
  1842.             rectangle = Rectangle to be used as the clipping rectangle
  1843. Result:         success = TRUE if successful; FALSE if unsuccessful
  1844. -------------------------
  1845. ClearRegion
  1846. Description:        removes all rectangles from a region
  1847. Library:        graphics.library
  1848. Offset:         -$0210 (-528)
  1849. Modula-2 Module:    Regions
  1850. Syntax:         ClearRegion(region)
  1851. C:            void ClearRegion(struct Region *)
  1852. Machine Language:    ClearRegion(a0)
  1853. Modula-2:        ClearRegion(region: RegionPtr)
  1854. Arguments:        region = Region to clear
  1855. Result:         none
  1856. -------------------------
  1857. ClearScreen
  1858. Description:        clears from the current position to the end of the RastPort
  1859. Library:        graphics.library
  1860. Offset:         -$0030 (-48)
  1861. Modula-2 Module:    Text
  1862. Syntax:         ClearScreen(rastPort)
  1863. C:            void ClearScreen(struct RastPort *)
  1864. Machine Language:    ClearScreen(a1)
  1865. Modula-2:        ClearScreen(rastPort: RastPortPtr)
  1866. Arguments:        rastPort = RastPort to clear
  1867. Result:         none
  1868. -------------------------
  1869. ClipBlit
  1870. Description:        copies bit-map data (and optionally manipulates) from one
  1871.             RastPort to another
  1872. Library:        graphics.library
  1873. Offset:         -$0228 (-552)
  1874. Modula-2 Module:    Blitter
  1875. Syntax:         ClipBlit(scrRastPort, srcX, srcY, destRastPort, destX, destY, sizeX,
  1876.             sizeY, miniterm)
  1877. C:            void ClipBlit(struct RastPort * long, long, struct RastPort *, long,
  1878.             long, long, long, long)
  1879. Machine Language:    ClipBlit(a0, d0, d1, a1, d2, d3, d4, d5, d6)
  1880. Modula-2:        ClipBlit(scrRPort: RastPortPtr; srcX, srcY: INTEGER; destRPort:
  1881.             RastPortPtr; destX, destY: INTEGER; sizeX, sizeY: INTEGER;
  1882.             miniterm: BYTE)
  1883. Arguments:        scrRastPort = source RastPort structure
  1884.             srcX = horizontal coordinate of upper left corner of source
  1885.             rectangle
  1886.             srcY = vertical coordinate of upper left corner of source rectangle
  1887.             destRastPort = destination RastPort structure
  1888.             destX = horizontal coordinate of upper left corner of destination
  1889.             rectangle
  1890.             destY = vertical coordinate of upper left corner of destination
  1891.             rectangle
  1892.             sizeX = width of rectangle
  1893.             sizeY = height of rectangle
  1894.             miniterm = logic function to apply to rectangle
  1895. Result:         none
  1896. -------------------------
  1897. Close
  1898. Description:        closes an open file
  1899. Library:        dos.library
  1900. Offset:         -$0024 (-36)
  1901. Modula-2 Module:    DOS
  1902. Syntax:         Close(file)
  1903. C:            void Close(BPTR)
  1904. Machine Language:    Close(d1)
  1905. Modula-2:        Close(file: FileHandle)
  1906. Arguments:        file = BCPL pointer to file handle of file to close
  1907. Result:         none
  1908. -------------------------
  1909. CloseDevice
  1910. Description:        terminates access to a device
  1911. Library:        exec.library
  1912. Offset:         -$01C2 (-450)
  1913. Modula-2 Module:    Devices
  1914. Syntax:         CloseDevice(ioRequest)
  1915. C:            void CloseDevice(struct IORequest *)
  1916. Machine Language:    CloseDevice(a1)
  1917. Modula-2:        CloseDevice(ioRequest: ADDRESS)
  1918. Arguments:        ioRequest = IORequest structure
  1919. Result:         none
  1920. -------------------------
  1921. CloseFont
  1922. Description:        tells the system that an opened font is no longer in use
  1923. Library:        graphics.library
  1924. Offset:         -$004E (-78)
  1925. Modula-2 Module:    Text
  1926. Syntax:         CloseFont(font)
  1927. C:            void CloseFont(struct TextFont *)
  1928. Machine Language:    CloseFont(a1)
  1929. Modula-2:        CloseFont(textfont: TextFontPtr)
  1930. Arguments:        font = font descriptor as returned by OpenFont( ) or
  1931.             OpenDiskFont( )
  1932. Result:         none
  1933. -------------------------
  1934. CloseLibrary
  1935. Description:        tells the system that an opened library is no longer in use
  1936. Library:        exec.library
  1937. Offset:         -$019E (-414)
  1938. Modula-2 Module:    Libraries
  1939. Syntax:         CloseLibrary(library)
  1940. C:            void CloseLibrary(struct Library *)
  1941. Machine Language:    CloseLibrary(a1)
  1942. Modula-2:        CloseLibrary(library: LibraryPtr)
  1943. Arguments:        library = base address of a library, as returned by OpenLibrary( )
  1944. Result:         none
  1945. -------------------------
  1946. CloseScreen
  1947. Description:        closes an Intuition screen
  1948. Library:        intuition.library
  1949. Offset:         -$0042 (-66)
  1950. Modula-2 Module:    Intuition
  1951. Syntax:         CloseScreen(screen)
  1952. C:            void CloseScreen(struct Screen *)
  1953. Machine Language:    CloseScreen(a0)
  1954. Modula-2:        CloseScreen(screen: ScreenPtr)
  1955. Arguments:        screen = screen to close
  1956. Result:         none
  1957. -------------------------
  1958. CloseWindow
  1959. Description:        closes an Intuition window
  1960. Library:        intuition.library
  1961. Offset:         -$0048 (-72)
  1962. Modula-2 Module:    Intuition
  1963. Syntax:         CloseWindow(window)
  1964. C:            void CloseWindow(struct Window *)
  1965. Machine Language:    CloseWindow(a0)
  1966. Modula-2:        CloseWindow(window: WindowPtr)
  1967. Arguments:        window = window to close
  1968. Result:         none
  1969. -------------------------
  1970. CloseWorkBench
  1971. Description:        attempts to close the Workbench screen
  1972. Library:        intuition.library
  1973. Offset:         -$004E (-78)
  1974. Modula-2 Module:    Intuition
  1975. Syntax:         success = CloseWorkBench( )
  1976. C:            long CloseWorkBench(void)
  1977. Machine Language:    d0 = CloseWorkBench( )
  1978. Modula-2:        CloseWorkBench( ): BOOLEAN
  1979. Arguments:        none
  1980. Result:         success = TRUE if successful; FALSE if unsuccessful
  1981. -------------------------
  1982. CMove
  1983. Description:        appends a copper move instruction to a user copper list without
  1984.             bumping the copper instruction pointer to the next instruction
  1985. Library:        graphics.library
  1986. Offset:         -$0174 (-372)
  1987. Modula-2 Module:    Copper
  1988. Syntax:         CMove(copList, r, v)
  1989. C:            void CMove(struct UCopList *, long, long)
  1990. Machine Language:    CMove(a1, d0, d1)
  1991. Modula-2:        CMove(copList: UCopListPtr; r: ADDRESS; v: WORD)
  1992. Arguments:        copList = UCopList structure
  1993.             a = address of hardware register to receive value
  1994.             v = value to store in hardware register
  1995. Result:         none
  1996. -------------------------
  1997. CMOVE (macro)
  1998. Description:        appends a copper move instruction to a user copper list and
  1999.             bumps the copper instruction pointer to the next instruction
  2000. C Include File:     include/graphics/gfxmacros.h
  2001. ML Include File:    none
  2002. Modula-2 Module:    Copper
  2003. Syntax:         CMOVE(copList, r, v)
  2004. C:            void CMOVE(struct UCopList *, APTR, short)
  2005. Machine Language:    not available
  2006. Modula-2:        CMOVE(copList: UCopListPtr; r: ADDRESS; v: WORD)
  2007. Arguments:        copList = UCopList structure
  2008.             a = address of hardware register to receive value
  2009.             v = value to store in hardware register
  2010. Result:         none
  2011. -------------------------
  2012. ConcatCList
  2013. Description:        concatenates two character lists
  2014. Library:        clist.library
  2015. Offset:         -$009C (-156)
  2016. Modula-2 Module:    none
  2017. Syntax:         error = ConcatCList(srcCList, destCList)
  2018. C:            long ConcatCList(long, long)
  2019. Machine Language:    d0 = ConcatCList(a0, a1)
  2020. Modula-2:        not available
  2021. Arguments:        srcCList = source character list
  2022.             destCList = destination character list
  2023. Result:         error = Zero if successful; Nonzero if unsuccessful (out of
  2024.             memory)
  2025. -------------------------
  2026. ConfigBoard
  2027. Description:        configures an expansion board
  2028. Library:        expansion.library
  2029. Offset:         -$003C (-60)
  2030. Modula-2 Module:    Expansion
  2031. Syntax:         error = ConfigBoard(board, configDev)
  2032. C:            long ConfigBoard(long, long)
  2033. Machine Language:    d0 = ConfigBoard(a0, a1)
  2034. Modula-2:        ConfigBoard(board: ADDRESS; configDev: ADDRESS):
  2035.             BOOLEAN
  2036. Arguments:        board = base address of expansion board (most likely
  2037.             E_EXPANSIONBASE)
  2038.             configDev = initialized ConfigDev structure
  2039. Result:         error = nonzero if unsuccessful
  2040. -------------------------
  2041. ConfigChain
  2042. Description:        configures the entire system
  2043. Library:        expansion.library
  2044. Offset:         -$0042 (-66)
  2045. Modula-2 Module:    Expansion
  2046. Syntax:         error = ConfigChain(baseAddr)
  2047. C:            long ConfigChain(long)
  2048. Machine Language:    d0 = ConfigChain(a0)
  2049. Modula-2:        ConfigChain(baseAddr: ADDRESS): BOOLEAN
  2050. Arguments:        baseAddr = base address (most likely E_EXPANSIONBASE)
  2051. Result:         error = nonzero if unsuccessful
  2052. -------------------------
  2053. CopyCList
  2054. Description:        copies a character list to a new character list
  2055. Library:        clist.library
  2056. Offset:         -$0090 (-144)
  2057. Modula-2 Module:    none
  2058. Syntax:         cList = CopyCList(cList)
  2059. C:            long CopyCList(long)
  2060. Machine Language:    d0 = CopyCList(a0)
  2061. Modula-2:        not available
  2062. Arguments:        cList = original character list
  2063. Result:         cList = new character list; Negative is unsuccessful (not enough
  2064.             memory)
  2065. -------------------------
  2066. CopyMem
  2067. Description:        copies the contents of RAM from one location to another
  2068. Library:        exec.library
  2069. Offset:         -$0270 (-624)
  2070. Modula-2 Module:    Memory
  2071. Syntax:         CopyMem(srcPointer, destPointer, size)
  2072. C:            void CopyMem(char *, char *, long)
  2073. Machine Language:    CopyMem(a0, a1, d0)
  2074. Modula-2:        CopyMem(srcPointer, destPointer: ADDRESS; size: LONGCARD)
  2075. Arguments:        srcPointer = pointer to memory block to be copied
  2076.             destPointer = pointer to destination memory block
  2077.             size = size of memory block in bytes
  2078. Result:         none
  2079. -------------------------
  2080. CopyMemQuick
  2081. Description:        performs an optimized copy of RAM with some restrictions
  2082. Library:        exec.library
  2083. Offset:         -$0276 (-630)
  2084. Modula-2 Module:    Memory
  2085. Syntax:         CopyMemQuick(srcPointer, destPointer, size)
  2086. C:            void CopyMemQuick(char *, char *, long)
  2087. Machine Language:    CopyMemQuick(a0, a1, d0)
  2088. Modula-2:        CopyMemQuick(srcPointer, destPointer: ADDRESS; size:
  2089.             LONGCARD)
  2090. Arguments:        srcPointer = pointer to the long-word aligned memory block to
  2091.             be copied
  2092.             destPointer = pointer to the long-word aligned destination mem-
  2093.             ory block
  2094.             size = size of memory block in bytes
  2095. Result:         none
  2096. -------------------------
  2097. CopySBitMap
  2098. Description:        copies all bits from a SuperBitMap into the Layer bitmap
  2099. Library:        graphics.library
  2100. Offset:         -$01C2 (-450)
  2101. Modula-2 Module:    Clip
  2102. Syntax:         CopySBitMap(layer)
  2103. C:            void CopySBitMap(struct Layer *)
  2104. Machine Language:    CopySBitMap(a0)
  2105. Modula-2:        CopySBitMap(layer: LayerPtr)
  2106. Arguments:        layer = pointer to a locked Layer that has a SuperBitMap
  2107. Result:         none
  2108. -------------------------
  2109. CreateBehindlayer
  2110. Description:        creates a new layer behind all existing layers
  2111. Library:        layers.library
  2112. Offset:         -$002A (-42)
  2113. Modula-2 Module:    Layers
  2114. Syntax:         layer = CreateBehindLayer(layerInfo, bitMap, x0, y0, x1, y1,
  2115.             flags, superBitMap)
  2116. C:            struct Layer *CreateBehindLayer(struct LayerInfo *, struct Bit-
  2117.             Map *, long, long, long, long, long, struct BitMap *)
  2118. Machine Language:    d0 = CreateBehindLayer(a0, a1, d0, d1, d2, d3, d4, a2)
  2119. Modula-2:        CreateBehindLayer(layerInfo: LayerInfoPtr; bitMap: BitMapPtr; x0,
  2120.             y0, x1, y1: LONGINT; flags: LayerFlagSet; superBitMap:
  2121.             BitMapPtr): LayerPtr
  2122. Arguments:        layerInfo = info structure of Layer to create
  2123.             bitMap = common BitMap used by all Layers
  2124.             x0 = horizontal coordinate of upper left corner of Layer
  2125.             y0 = vertical coordinate of upper left corner of Layer
  2126.             x1 = horizontal coordinate of lower right corner of Layer
  2127.             y1 = vertical coordinate of lower right corner of Layer
  2128.             flags = type of Layer
  2129.             superBitMap = NULL or a SuperBitMap
  2130. Result:         layer = pointer to Layer structure if successful; NULL if
  2131.             unsuccessful
  2132. -------------------------
  2133. CreateDir
  2134. Description:        creates a new directory
  2135. Library:        dos.library
  2136. Offset:         -$0078 (-120)
  2137. Modula-2 Module:    DOS
  2138. Syntax:         lock = CreateDir(name)
  2139. C:            BPTR CreateDir(char *)
  2140. Machine Language:    d0 = CreateDir(d1)
  2141. Modula-2:        CreateDir(name: STRPTR): FileLock
  2142. Arguments:        name = NULL terminate string that specifies the new directory
  2143.             name
  2144. Result:         lock = BCPL pointer to a lock
  2145. -------------------------
  2146. CreateExtIO
  2147. Description:        allocates memory for and initializes an IO request block
  2148. Library:        amiga.lib (linked library)
  2149. Modula-2 Module:    IOUtils
  2150. Syntax:         block = CreateExtIO(ioReplyPort, size)
  2151. C:            struct IORequest *CreateExtIO(struct MsgPort *, long)
  2152. Machine Language:    move.l #size,-(sp)
  2153.             pea ioReplyPort
  2154.             jsr _CreateExtIO ;block returned in d0
  2155.             addq.l #8,sp
  2156. Modula-2:        CreateExtIO(ioReplyPort: MsgPortPtr; size: CARDINAL):
  2157.             ADDRESS
  2158. Arguments:        ioReplyPort = initialized MsgPort
  2159.             size = IORequest block size
  2160. Result:         block = pointer to newly created IORequest block; NULL if un-
  2161.             successful (not enough memory)
  2162. -------------------------
  2163. CreatePort
  2164. Description:        allocates memory for and initializes a message port
  2165. Library:        amiga.lib (linked library)
  2166. Modula-2 Module:    PortUtils
  2167. Syntax:         port = CreatePort(name, pri)
  2168. C:            struct MsgPort *CreatePort(char *, long)
  2169. Machine Language:    move.l #pri,-(sp)
  2170.             pea name
  2171.             jsr _CreatePort ;port returned in d0
  2172.             addq.l #8,sp
  2173. Modula-2:        CreatePort(name: STRPTR; pri: INTEGER): MsgPortPtr
  2174. Arguments:        name = name of public port to create; NULL for private port
  2175.             pri = priority to assign to port
  2176. Result:         port = pointer to newly created message port; NULL if unsuc-
  2177.             cessful (not enough memory)
  2178. -------------------------
  2179. CreateProc
  2180. Description:        creates a new process
  2181. Library:        dos.library
  2182. Offset:         -$008A (-138)
  2183. Modula-2 Module:    DOSProcess
  2184. Syntax:         process = CreateProc(name, pri, segment, stackSize)
  2185. C:            struct MsgPort *CreateProc(char *, long, BPTR, long)
  2186. Machine Language:    d0 = CreateProc(d1, d2, d3, d4)
  2187. Modula-2:        CreateProc(name: STRPTR; pri: LONGINT; segment: BPTR;
  2188.             stackSize: LONGINT): ProcessID
  2189. Arguments:        name = NULL terminated string that specifies the new process
  2190.             name
  2191.             priority = priority to be given to process
  2192.             segment = segment list, as returned by LoadSeg( )
  2193.             stackSize = size of root stack in bytes
  2194. Result:         process = pointer to newly created IORequest block; NULL if un-
  2195.             successful (not enough memory)
  2196. -------------------------
  2197. CreateTask
  2198. Description:        creates a task
  2199. Library:        amiga.lib (linked library)
  2200. Modula-2 Module:    TaskUtils
  2201. Syntax:         task = CreateTask(name, pri, initPC, stackSize)
  2202. C:            struct Task *CreateTask(char *, long, _fptr, long)
  2203. Machine Language:    move.l #stackSize,-(sp)
  2204.             pea initPC
  2205.             move.l #pri,-(sp)
  2206.             pea name
  2207.             jsr _CreateTask ;task returned in d0
  2208.             add.l #16,sp
  2209. Modula-2:        CreateTask(name: STRPTR; pri: INTEGER; initP
  2210. C:            PROC; stackSize: LONGCARD): TaskPtr
  2211. Arguments:        name = name of task
  2212.             pri = exec task priority (-128 through 127, usually 0)
  2213.             stackSize = size of stack in bytes
  2214. Result:         task = pointer to newly created task; NULL if unsuccessful (not
  2215.             enough memory)
  2216. -------------------------
  2217. CreateUpfrontLayer
  2218. Description:        creates a new layer on top of all existing layers
  2219. Library:        layers.library
  2220. Offset:         -$0024 (-36)
  2221. Modula-2 Module:    Layers
  2222. Syntax:         layer = CreateUpfrontLayer(layerInfo, bitMap, x0, y0, x1, y1,
  2223.             flags, superBitMap)
  2224. C:            struct Layer *CreateUpfrontLayer(struct Layer_Info *, struct Bit-
  2225.             Map *, long, long, long, long, long, struct BitMap *)
  2226. Machine Language:    d0 = CreateUpfrontLayer(a0, a1, d0, d1, d2, d3, d4, a2)
  2227. Modula-2:        CreateUpfrontLayer(layerInfo: LayerInfoPtr; bitMap: BitMapPtr;
  2228.             x0, y0, x1, y1: LONGINT; flags: LayerFlagSet; superBitMap:
  2229.             BitMapPtr): LayerPtr
  2230. Arguments:        layerInfo = info structure of Layer to create
  2231.             bitMap = common BitMap used by all Layers
  2232.             x0 = horizontal coordinate of upper left corner of Layer
  2233.             y0 = vertical coordinate of upper left corner of Layer
  2234.             x1 = horizontal coordinate of lower right corner of Layer
  2235.             y1 = vertical coordinate of lower right corner of Layer
  2236.             flags = type of Layer
  2237.             superBitMap = NULL or pointer to SuperBitMap
  2238. Result:         layer = pointer to Layer structure if successful; NULL if
  2239.             unsuccessful
  2240. -------------------------
  2241. CurrentDir
  2242. Description:        changes the current directory and returns the old current directory
  2243. Library:        dos.library
  2244. Offset:         -$007E (-126)
  2245. Modula-2 Module:    DOS
  2246. Syntax:         oldlock = CurrentDir(lock)
  2247. C:            BPTR CurrentDir(BPTR)
  2248. Machine Language:    d0 = CurrentDir(d1)
  2249. Modula-2:        CurrentDir(lock: FileLock): FileLock
  2250. Arguments:        lock = BCPL pointer to lock associated with new current
  2251.             directory
  2252. Result:         oldlock = BCPL pointer to lock associated with old directory
  2253. -------------------------
  2254. CurrentTime
  2255. Description:        returns the current system time
  2256. Library:        intuition.library
  2257. Offset:         -$0054 (-84)
  2258. Modula-2 Module:    Intuition
  2259. Syntax:         CurrentTime(seconds, micros)
  2260. C:            void CurrentTime(long *, long *)
  2261. Machine Language:    CurrentTime(d0, d1)
  2262. Modula-2:        CurrentTime(VAR seconds, micros: LONGCARD)
  2263. Arguments:        seconds = pointer to four-byte (LONG) variable to receive sec-
  2264.             onds value
  2265.             micros = pointer to four-byte (LONG) variable to receive micro-
  2266.             seconds value
  2267. Result:         returned in seconds and micros arguments
  2268. -------------------------
  2269. CWait
  2270. Description:        appends copper wait instruction to a user copper list without
  2271.             bumping the copper instruction pointer to the next instruction
  2272. Library:        graphics.library
  2273. Offset:         -$017A (-378)
  2274. Modula-2 Module:    CopperUtil
  2275. Syntax:         CWait(copList, vert, horiz)
  2276. C:            void CWait(struct UCopList *, short, short)
  2277. Machine Language:    not available
  2278. Modula-2:        CWait(copList: UCopListPtr; vert, horiz: INTEGER)
  2279. Arguments:        copList = UCopList structure
  2280.             vert = vertical beam position relative to top of ViewPort
  2281.             horiz = horizontal beam position (must be less than 223)
  2282. Result:         none
  2283. -------------------------
  2284. CWAIT (macro)
  2285. Description:        appends copper wait instruction to a user copper list and bumps
  2286.             the copper instruction pointer to the next instruction
  2287. C Include File:     include/graphics/gfxmacros.h
  2288. ML Include File:    none
  2289. Modula-2 Module:    CopperUtil
  2290. Syntax:         CWAIT(copList, vert, horiz)
  2291. C:            void CWAIT(struct UCopList *, short, short)
  2292. Machine Language:    not available
  2293. Modula-2:        CWAIT(copList: UCopListPtr; vert, horiz: INTEGER)
  2294. Arguments:        copList = UCopList structure
  2295.             vert = vertical beam position relative to top of ViewPort
  2296.             horiz = horizontal beam position (must be less than 223)
  2297. Result:         none
  2298. -------------------------
  2299. DateStamp
  2300. Description:        returns the current date and time in internal format
  2301. Library:        dos.library
  2302. Offset:         -$00C0 (-192)
  2303. Modula-2 Module:    DOS
  2304. Syntax:         DateStamp(v)
  2305. C:            long *DateStamp(long *)
  2306. Machine Language:    DateStamp(d1)
  2307. Modula-2:        DateStamp(v: DateStampRecPtr)
  2308. Arguments:        v = pointer to the first element of an array of three long words
  2309. Result:         v argument points to result in RAM
  2310. -------------------------
  2311. dbf
  2312. Description:        converts a fast floating point dual-binary number to plain fast
  2313.             floating point format
  2314. Library:        amiga.lib (linked library)
  2315. Modula-2 Module:    none
  2316. Syntax:         fnum = dbf(exp, mant)
  2317. C:            float dbf(long, long)
  2318. Machine Language:    move.l #mant,-(sp)
  2319.             move.l #exp,-(sp)
  2320.             jsr _dfb ;fnum returned in d0/d1
  2321.             addq.l #8,sp
  2322. Modula-2:        not available
  2323. Arguments:        exp = 16 bit integer representing the sign (bit 16 equals 0 for
  2324.             positive or 1 for negative) and base ten exponent (bits 0-15)
  2325.             mant = integer representing the mantissa
  2326. Result:         fnum = floating point equivalent of value specified by exp and
  2327.             mant arguments
  2328. -------------------------
  2329. Deallocate
  2330. Description:        deallocates a block of previously allocated memory
  2331. Library:        exec.library
  2332. Offset:         -$00C0 (-192)
  2333. Modula-2 Module:    Memory
  2334. Syntax:         Deallocate(freeList, memoryBlock, byteSize)
  2335. C:            void Deallocate(struct MemHeader *, void *, long)
  2336. Machine Language:    Deallocate(a0, a1, d0)
  2337. Modula-2:        Deallocate(freeList: MemHeaderPtr; memoryBlock: ADDRESS;
  2338.             byteSize: LONGCARD)
  2339. Arguments:        freeList = memory list header
  2340.             memoryBlock = memory block to deallocate
  2341.             byteSize = size of memory block in bytes
  2342. Result:         none
  2343. -------------------------
  2344. Debug
  2345. Description:        runs the system debugger or the debugger installed by
  2346.             SetFunction
  2347. Library:        exec.library
  2348. Offset:         -$0072 (-114)
  2349. Modula-2 Module:    Exec
  2350. Syntax:         Debug(num)
  2351. C:            void Debug(long)
  2352. Machine Language:    Debug(d0)
  2353. Modula-2:        Debug(num: LONGCARD)
  2354. Arguments:        num = should be set to 0
  2355. Result:         none
  2356. -------------------------
  2357. Delay
  2358. Description:        delays a process for a specified amount of time
  2359. Library:        dos.library
  2360. Offset:         -$00C6 (-198)
  2361. Modula-2 Module:    DOSProcess
  2362. Syntax:         Delay(ticks)
  2363. C:            void Delay(long)
  2364. Machine Language:    Delay(d1)
  2365. Modula-2:        Delay(ticks: LONGINT)
  2366. Arguments:        ticks = number of ticks to wait (50 ticks per second)
  2367. Result: none
  2368. -------------------------
  2369. DeleteExtIO
  2370. Description:        returns memory allocated by CreateExtIO
  2371. Library:        amiga.lib (linked library)
  2372. Modula-2 Module:    IOUtils
  2373. Syntax:         DeleteExtIO(ioRequest, size)
  2374. C:            void DeleteExtIO(struct IORequest *, long)
  2375. Machine Language:    move.l #size,-(sp)
  2376.             pea ioRequest
  2377.             jsr _DeleteExtIO
  2378.             addq.l #4,sp
  2379. Modula-2:        DeleteExtIO(ioReq: ADDRESS; size: CARDINAL)
  2380. Arguments:        ioRequest = IORequest block to delete
  2381.             size = size of IORequest block in bytes
  2382. Result:         none
  2383. -------------------------
  2384. DeleteFile
  2385. Description:        deletes a file or directory
  2386. Library:        dos.library
  2387. Offset:         -$0048 (-72)
  2388. Modula-2 Module:    DOS
  2389. Syntax:         success = DeleteFile(name)
  2390. C:            long DeleteFile(char *)
  2391. Machine Language:    d0 = DeleteFile(d1)
  2392. Modula-2:        DeleteFile(name: STRPTR): BOOLEAN
  2393. Arguments:        name = NULL terminated string that specifies the file to delete
  2394. Result:         TRUE if successful; FALSE if unsuccessful
  2395. -------------------------
  2396. DeleteLayer
  2397. Description:        deletes a layer from a layer list
  2398. Library:        layers.library
  2399. Offset:         -$005A (-90)
  2400. Modula-2 Module:    Layers
  2401. Syntax:         success = DeleteLayer(dummy, layer)
  2402. C:            long DeleteLayer(struct Layer_Info, struct Layer *)
  2403. Machine Language:    d0 = DeleteLayer(a0, a1)
  2404. Modula-2:        DeleteLayer(layer: LayerPtr): BOOLEAN
  2405. Arguments:        dummy = unused
  2406.             layer = layer to delete
  2407. Result:         success = TRUE if successful; FALSE if unsuccessful
  2408. -------------------------
  2409. DeletePort
  2410. Description:        frees a message port created by CreatePort( )
  2411. Library:        amiga.lib (linked library)
  2412. Modula-2 Module:    PortUtils
  2413. Syntax:         DeletePort(msgPort)
  2414. C:            void DeletePort(struct MsgPort *)
  2415. Machine Language:    pea msgPort
  2416.             jsr _DeletePort
  2417.             addq.l #4,sp
  2418. Modula-2:        DeletePort(msgPort: MsgPortPtr)
  2419. Arguments:        msgPort = message port to delete
  2420. Result:         none
  2421. -------------------------
  2422. DeleteTask
  2423. Description:        deletes a task created with CreateTask( )
  2424. Library:        amiga.lib (linked library)
  2425. Modula-2 Module:    TaskUtils
  2426. Syntax:         DeleteTask(task)
  2427. C:            void DeleteTask(struct Task *)
  2428. Machine Language:    pea task
  2429.             jsr _DeleteTask
  2430.             addq.l #4,sp
  2431. Modula-2:        DeleteTask(task: TaskPtr)
  2432. Arguments:        task = Task to delete
  2433. Result:         none
  2434. -------------------------
  2435. DeviceProc
  2436. Description:        returns the process identifier of specified process
  2437. Library:        dos.library
  2438. Offset:         -$00AE (-174)
  2439. Modula-2 Module:    DOSProcess
  2440. Syntax:         process = DeviceProc(name)
  2441. C:            struct MsgPort *DeviceProc(char *)
  2442. Machine Language:    d0 = DeviceProc(d1)
  2443. Modula-2:        DeviceProc(name: STRPTR): ProcessID
  2444. Arguments:        name = NULL terminated string that specifies the device name
  2445. Result:         process = BCPL pointer to a process; NULL if unsuccessful
  2446. -------------------------
  2447. Disable
  2448. Description:        disables interrupt processing
  2449. Library:        exec.library
  2450. Offset:         -$0078 (-120)
  2451. Modula-2 Module:    Interrupts
  2452. Syntax:         Disable( )
  2453. C:            void Disable(void)
  2454. Machine Language:    Disable( )
  2455. Modula-2:        Disable( )
  2456. Arguments:        none
  2457. Result:         none
  2458. -------------------------
  2459. DisownBlitter
  2460. Description:        frees blitter for use by other programs
  2461. Library:        graphics.library
  2462. Offset:         -$01CE (-462)
  2463. Modula-2 Module:    Blitter
  2464. Syntax:         DisownBlitter( )
  2465. C:            void DisownBlitter(void)
  2466. Machine Language:    DisownBlitter( )
  2467. Modula-2:        DisownBlitter( )
  2468. Arguments:        none
  2469. Result:         none
  2470. -------------------------
  2471. DisplayAlert
  2472. Description:        creates an Alert
  2473. Library:        intuition.library
  2474. Offset:         -$005A (-90)
  2475. Modula-2 Module:    Intuition
  2476. Syntax:         response = DisplayAlert(alertNumber, message, height)
  2477. C:            long DisplayAlert(long, char *, long)
  2478. Machine Language:    d0 = DisplayAlert(d0, a0, d1)
  2479. Modula-2:        DisplayAlert(alertNumber: LONGCARD; message: ADDRESS;
  2480.             height: CARDINAL): BOOLEAN
  2481. Arguments:        alertNumber = AlertMessage number
  2482.             message = NULL terminated Alert message string
  2483.             height = minimum display lines required for your message
  2484. Result:         response = TRUE or FALSE, depending on alert type and user
  2485.             response
  2486. -------------------------
  2487. DisplayBeep
  2488. Description:        flashes the video display and emits a beep
  2489. Library:        intuition.library
  2490. Offset:         -$0060 (-96)
  2491. Modula-2 Module:    Intuition
  2492. Syntax:         DisplayBeep(screen)
  2493. C:            void DisplayBeep(struct Screen *)
  2494. Machine Language:    DisplayBeep(a0)
  2495. Modula-2:        DisplayBeep(screen: ScreenPtr)
  2496. Arguments:        screen = screen to beep
  2497. Result:         none
  2498. -------------------------
  2499. DisposeFontContents (available in library version 34)
  2500. Description:        frees the array of FontContents returned by NewFontContents( )
  2501. Library:        diskfont.library
  2502. Offset:         -$0030 (-48)
  2503. Modula-2 Module:    none
  2504. Syntax:         DisposeFontContents(fontContentsHeader)
  2505. C:            void DisposeFontContents(struct FontContentsHeader *)
  2506. Machine Language:    DisposeFontContents(a1)
  2507. Modula-2:        not available
  2508. Arguments:        fontContentsHeader = FontContentsHeader as returned by
  2509.             NewFontContents( )
  2510. Result:         none
  2511. -------------------------
  2512. DisposeLayerInfo
  2513. Description:        returns memory used by a LayerInfo structure
  2514. Library:        layers.library
  2515. Offset:         -$0096 (-150)
  2516. Modula-2 Module:    Layers
  2517. Syntax:         DisposeLayerInfo(layerInfo)
  2518. C:            void DisposeLayerInfo(struct Layer_Info *)
  2519. Machine Language:    DisposeLayerInfo(a0)
  2520. Modula-2:        DisposeLayerInfo(layerInfo: layerInfoPtr)
  2521. Arguments:        layerInfo = LayerInfo structure to remove
  2522. Result:         none
  2523. -------------------------
  2524. DisposeRegion
  2525. Description:        returns memory used by a Region structure and its
  2526.             RegionRectangles
  2527. Library:        graphics.library
  2528. Offset:         -$0216 (-534)
  2529. Modula-2 Module:    Regions
  2530. Syntax:         DisposeRegion(region)
  2531. C:            void DisposeRegion(struct Region *)
  2532. Machine Language:    DisposeRegion(a0)
  2533. Modula-2:        DisposeRegion(region: RegionPtr)
  2534. Arguments:        region = Region structure to remove
  2535. Result:         none
  2536. -------------------------
  2537. DoCollision
  2538. Description:        tests all GELs in GEL list for GEL-to-GEL collisions
  2539. Library:        graphics.library
  2540. Offset:         -$006C (-108)
  2541. Modula-2 Module:    Gels
  2542. Syntax:         DoCollision(rastPort)
  2543. C:            void DoCollision(struct RastPort *)
  2544. Machine Language:    DoCollision(a1)
  2545. Modula-2:        DoCollision(rastPort: RastPortPtr)
  2546. Arguments:        rastPort = RastPort with GEL list
  2547. Result:         none
  2548. -------------------------
  2549. DoIO
  2550. Description:        performs IO command and waits for completion
  2551. Library:        exec.library
  2552. Offset:         -$01C8 (-465)
  2553. Modula-2 Module:    IO
  2554. Syntax:         error = DoIO(ioRequest)
  2555. C:            long DoIO(struct IORequest *)
  2556. Machine Language:    d0 = DoIO(a1)
  2557. Modula-2:        DoIO(ioRequest: ADDRESS): INTEGER
  2558. Arguments:        ioRequest = initialized IORequest structure
  2559. Result:         error = zero if successful; nonzero if unsuccessful
  2560. -------------------------
  2561. DoubleClick
  2562. Description:        test two time values for double-click timing
  2563. Library:        intuition.library
  2564. Offset:         -$0066 (-102)
  2565. Modula-2 Module:    Intuition
  2566. Syntax:         double = DoubleClick(startSecs, startMicros, currentSecs,
  2567.             currentMicros)
  2568. C:            long DoubleClick(long, long, long, long)
  2569. Machine Language:    d0 = DoubleClick(d0, d1, d2, d3)
  2570. Modula-2:        DoubleClick(startSecs, startMicros, currentSecs, currentMicros:
  2571.             LONGCARD): BOOLEAN
  2572. Arguments:        startSecs = seconds value at time of first click
  2573.             startMicros = micros value at time of first click
  2574.             currentSecs = seconds value at time of second click
  2575.             currentMicros = micros value at time of second click
  2576. Result:         double = TRUE if valid double click; FALSE if not
  2577. -------------------------
  2578. Draw
  2579. Description:        draws a line from current pen position to specified point
  2580. Library:        graphics.library
  2581. Offset:         -$00F6 (-246)
  2582. Modula-2 Module:    Pens
  2583. Syntax:         Draw(rastPort, x, y)
  2584. C:            long Draw(struct RastPort *, long, long)
  2585. Machine Language:    Draw(a1, d0, d1)
  2586. Modula-2:        Draw(rastPort: RastPortPtr; x, y: INTEGER)
  2587. Arguments:        rastPort = RastPort to draw line in
  2588.             x = horizontal coordinate of line's destination
  2589.             y = vertical coordinate of line's destination
  2590. Result:         none
  2591. -------------------------
  2592. DrawBorder
  2593. Description:        draws a border
  2594. Library:        intuition.library
  2595. Offset:         -$006C (-108)
  2596. Modula-2 Module:    Intuition
  2597. Syntax:         DrawBorder(rastPort, border, leftOffset, topOffset)
  2598. C:            long DrawBorder(struct RastPort *, struct Border *, long, long)
  2599. Machine Language:    DrawBorder(a0, a1, d0, d1)
  2600. Modula-2:        DrawBorder(rastPort: RastPortPtr; border: BorderPtr; leftOffset,
  2601.             topOffset: INTEGER)
  2602. Arguments:        rastPort = RastPort to draw border in
  2603.             border = Border to be drawn
  2604.             leftOffset = horizontal placement offset for border
  2605.             topOffset = vertical placement offset for border
  2606. Result:         none
  2607. -------------------------
  2608. DrawCircle (macro)
  2609. Description:        draws a circle in the specified RastPort
  2610. C Include File:     include/graphics/gfxmacros.h
  2611. ML Include File:    none
  2612. Modula-2 Module:    Pens
  2613. Syntax:         DrawCircle(rastPort, cx, cy, radius)
  2614. C:            void DrawCircle(struct RastPort *, long, long, long)
  2615. Machine Language:    not available, use DrawEllipse instead
  2616. Modula-2:        DrawCircle(rastPort: RastPortPtr; cx, cy, radius: INTEGER)
  2617. Arguments:        rastPort = RastPort structure
  2618.             cx = horizontal coordinate of circle's center
  2619.             cy = vertical coordinate of circle's center
  2620.             radius = circle's radius
  2621. Result:         none
  2622. -------------------------
  2623. DrawEllipse
  2624. Description:        draws an elliptical outline within a rectangular outline
  2625. Library:        graphics.library
  2626. Offset:         -$00B4 (-180)
  2627. Modula-2 Module:    Pens
  2628. Syntax:         DrawEllipse(rastPort, cx, cy, a, b)
  2629. C:            void DrawEllipse(struct RastPort *, long, long, long, long)
  2630. Machine Language:    DrawEllipse(a1, d0, d1, d2, d3)
  2631. Modula-2:        DrawEllipse(rastPort: RastPortPtr; cx, cy, a, b: INTEGER)
  2632. Arguments:        rastPort = RastPort into which ellipse will be drawn
  2633.             cx = horizontal coordinate of ellipse's center, relative to the
  2634.             RastPort
  2635.             cy = vertical coordinate of ellipse's center, relative to the RastPort
  2636.             a = ellipse's horizontal radius (must be greater than O)
  2637.             b = ellipse's vertical radius (must be greater than O)
  2638. Result:         none
  2639. -------------------------
  2640. DrawGList
  2641. Description:        processes a GEL list, drawing bobs and constructing a copper list
  2642.             for VSprites
  2643. Library:        graphics.library
  2644. Offset:         -$0072 (-114)
  2645. Modula-2 Module:    Gels
  2646. Syntax:         DrawGList(rastPort, viewPort)
  2647. C:            void DrawGList(struct RastPort *, struct ViewPort *)
  2648. Machine Language:    DrawGList(a1, a0)
  2649. Modula-2:        DrawGList(rastPort: RastPortPtr; viewPort: ViewPortPtr)
  2650. Arguments:        rastPort = RastPort where bobs will be drawn
  2651.             viewPort = ViewPort in which VSprites will be created
  2652. Result:         none
  2653. -------------------------
  2654. DrawImage
  2655. Description:        draw the specified image
  2656. Library:        intuition.library
  2657. Offset:         -$0072 (-114)
  2658. Modula-2 Module:    Intuition
  2659. Syntax:         DrawImage(rastPort, image, leftOffset, topOffset)
  2660. C:            long DrawImage(struct RastPort *, struct Image *, long, long)
  2661. Machine Language:    DrawImage(a0, a1, d0, d1)
  2662. Modula-2:        DrawImage(rastPort: RastPortPtr; image: ImagePtr; leftOffset,
  2663.             topOffset: INTEGER)
  2664. Arguments:        rastPort = RastPort where image will be drawn
  2665.             image = Image to be drawn
  2666.             leftOffset = horizontal placement offset for image
  2667.             topOffset = vertical placement offset for image
  2668. Result:         none
  2669. -------------------------
  2670. Duplock
  2671. Description:        duplicates a lock
  2672. Library:        dos.library
  2673. Offset:         -$0060 (-96)
  2674. Modula-2 Module:    DOS
  2675. Syntax:         newlock = DupLock(lock)
  2676. C:            BPTR DupLock(BPTR)
  2677. Machine Language:    d0 = DupLock(d1)
  2678. Modula-2:        DupLock(lock: FileLock): FileLock
  2679. Arguments:        lock = lock to duplicate
  2680. Result:         newlock = duplicate lock
  2681. -------------------------
  2682. Enable
  2683. Description:        enables interrupt processing
  2684. Library:        exec.library
  2685. Offset:         -$007E (-126)
  2686. Modula-2 Module:    Interrupts
  2687. Syntax:         Enable( )
  2688. C:            void Enable(void)
  2689. Machine Language:    Enable( )
  2690. Modula-2:        Enable( )
  2691. Arguments:        none
  2692. Result:         none
  2693. -------------------------
  2694. EndRefresh
  2695. Description:        ends optimized refresh of a window
  2696. Library:        intuition.library
  2697. Offset:         -$016E (-366)
  2698. Modula-2 Module:    Intuition
  2699. Syntax:         EndRefresh(window, complete)
  2700. C:            void EndRefresh(struct Window *, long)
  2701. Machine Language:    EndRefresh(a0, d0)
  2702. Modula-2:        EndRefresh(window: WindowPtr; complete: BOOLEAN)
  2703. Arguments:        window = window in optimized-refresh mode
  2704.             complete = TRUE if window is completely refreshed; FALSE if
  2705.             not
  2706. Result:         none
  2707. -------------------------
  2708. EndRequest
  2709. Description:        removes requester from window
  2710. Library:        intuition.library
  2711. Offset:         -$0078 (-120)
  2712. Modula-2 Module:    Intuition
  2713. Syntax:         EndRequest(requester, window)
  2714. C:            void EndRequest(struct Requester *, struct Window *)
  2715. Machine Language:    EndRequest(a0, a1)
  2716. Modula-2:        EndRequest(requester: RequesterPtr; window: WindowPtr)
  2717. Arguments:        requester = requester to remove
  2718.             window = window which is associated with requester
  2719. Result:         none
  2720. -------------------------
  2721. EndUpdate
  2722. Description:        removes damage list and restores layer to normal state
  2723. Library:        layers.library
  2724. Offset:         -$0054 (-84)
  2725. Modula-2 Module:    Layers
  2726. Syntax:         EndUpdate(layer, flag)
  2727. C:            void EndUpdate(struct Layer *, long)
  2728. Machine Language:    EndUpdate(a0, d0)
  2729. Modula-2:        EndUpdate(layer: LayerPtr; flag: BOOLEAN)
  2730. Arguments:        layer = layer to return to normal state
  2731.             flag = TRUE if update was complete-damage list will be
  2732.             cleared; FALSE if update was not complete-damage list will be
  2733.             retained
  2734. Result: none
  2735. -------------------------
  2736. Enqueue
  2737. Description:        inserts or appends node to a system queue
  2738. Library:        exec.library
  2739. Offset:         -$010E (-270)
  2740. Modula-2 Module:    Lists
  2741. Syntax:         Enqueue(list, node)
  2742. C:            void Enqueue(struct List *, struct Node *)
  2743. Machine Language:    Enqueue(a0, a0)
  2744. Modula-2:        Enqueue(list: ListPtr; node: NodePtr)
  2745. Arguments:        list = system queue header
  2746.             node = node to insert or append
  2747. Result:         none
  2748. -------------------------
  2749. Examine
  2750. Description:        examines a directory or file
  2751. Library:        dos.library
  2752. Offset:         -$0066 (-102)
  2753. Modula-2 Module:    DOS
  2754. Syntax:         success = Examine(lock, infoBlock)
  2755. C:            long Examine(BPTR, struct FileInfoBlock *)
  2756. Machine Language:    d0 = Examine(d1, d2)
  2757. Modula-2:        Examine(lock: FileLock; infoBlock: FileInfoBlockPtr): BOOLEAN
  2758. Arguments:        lock = lock of directory or file to examine
  2759.             infoBlock = info block to receive directory or file information
  2760. Result:         success = TRUE if successful; FALSE if unsuccessful
  2761. -------------------------
  2762. Execute
  2763. Description:        executes a CLI command
  2764. Library:        dos.library
  2765. Offset:         -$00DE (-222)
  2766. Modula-2 Module:    DOSLoader
  2767. Syntax:         success = Execute(command, input, output)
  2768. C:            long Execute(char *, BPTR, BPTR)
  2769. Machine Language:    d0 = Execute(d1, d2, d3)
  2770. Modula-2:        Execute(command: STRPTR; input, output: FileHandle):
  2771.             BOOLEAN
  2772. Arguments:        command = NULL terminated string containing CLI command
  2773.             input = file handle for input redirection; NULL if none
  2774.             output = file handle for output redirection; NULL if none
  2775. Result:         success = TRUE if successful; FALSE if unsuccessful
  2776. -------------------------
  2777. Exit
  2778. Description:        ends a program
  2779. Library:        dos.library
  2780. Offset:         -$0090 (-144)
  2781. Modula-2 Module:    DOSProcess
  2782. Syntax:         Exit(returnCode)
  2783. C:            void Exit(long)
  2784. Machine Language:    Exit(d1)
  2785. Modula-2:        Exit(returnCode: LONGINT)
  2786. Arguments:        returnCode = return code passed to parent (usually the CLI)-by
  2787.             convention, a value of zero implies no error
  2788. Result:         none
  2789. -------------------------
  2790. ExNext
  2791. Description:        examines the next entry in a directory
  2792. Library:        dos.library
  2793. Offset:         -$006C (-108)
  2794. Modula-2 Module:    DOS
  2795. Syntax:         success = ExNext(lock, infoBlock)
  2796. C:            long ExNext(BPTR, struct FilelnfoBlock *)
  2797. Machine Language:    d0 = ExNext(d1, d2)
  2798. Modula-2:        ExNext(lock: FileLock; infoBlock: FileInfoBlockPtr): BOOLEAN
  2799. Arguments:        lock = lock of directory to examine
  2800.             infoBlock = info block to receive entry information
  2801. Result:         success = TRUE if successful; FALSE if unsuccessful
  2802. -------------------------
  2803. FastRand
  2804. Description:        generates a somewhat random integer
  2805. Library:        amiga.lib (linked library)
  2806. Modula-2 Module:    none
  2807. Syntax:         rnd = FastRand(seed)
  2808. C:            long FastRand(long)
  2809. Machine Language:    move.l #long,-(sp)
  2810.             jsr _FastRand ;rnd returned in d0
  2811.             addq.l #4,sp
  2812. Modula-2:        not available, use Random in RandomNumbers module
  2813. Arguments:        seed = value used to seed random number
  2814. Result:         rnd = random number calculate using the following C equation:
  2815.             rnd=(seed << 1) ^ 0x1872B41
  2816. -------------------------
  2817. FattenLayerInfo
  2818. Description:        converts 1.0 LayerInfo structure to 1.1-1.3-compatible LayerInfo
  2819.             structure
  2820. Library:        layers.library
  2821. Offset:         -$009C (-156)
  2822. Modula-2 Module:    none
  2823. Syntax:         FattenLayerInfo(layerInfo)
  2824. C:            void FattenLayerInfo(struct Layer_Info *)
  2825. Machine Language:    FattenLayerInfo(a0)
  2826. Modula-2:        not available
  2827. Arguments:        layerInfo = LayerInfo structure to update
  2828. Result:         none
  2829. -------------------------
  2830. FindConfigBoard
  2831. Description:        finds a matching ConfigDev entry
  2832. Library:        expansion.library
  2833. Offset:         -$0048 (-72)
  2834. Modula-2 Module:    none
  2835. Syntax:         configDev = FindConfigBoard(oldConfigDev, manufacturer,
  2836.             product)
  2837. C:            struct ConfigDev *FindConfigBoard(long, long, long)
  2838. Machine Language:    d0 = FindConfigBoard(a0, d0, d1)
  2839. Modula-2:        not available
  2840. Arguments:        oldConfigDev = ConfigDev structure just before the location in
  2841.             ConfigDev list where search should begin; NULL to start search at
  2842.             the beginning of the list
  2843.             manufacturer = manufacturer code to search for; -1 to ignore
  2844.             manufacturer code
  2845.             product = product code to search for; -1 to ignore product coed
  2846. Result:         configDev = first ConfigDev structure that matches the manufac-
  2847.             turer and product codes specified; NULL if no more matches
  2848. -------------------------
  2849. FindName
  2850. Description:        finds a system list node
  2851. Library:        exec.library
  2852. Offset:         -$0114 (-276)
  2853. Modula-2 Module:    Lists
  2854. Syntax:         node = FindName(start, name)
  2855. C:            struct Node *FindName(struct List *, char *)
  2856. Machine Language:    d0 = FindName(a0, a1)
  2857. Modula-2:        FindName(start: ADDRESS; name: STRPTR): NodePtr
  2858. Arguments:        start = list header or list node to start search (if node this one is
  2859.             skipped)
  2860.             name = NULL terminated string that specifies name of node
  2861. Result:         node = pointer to specified node; NULL if unsuccessful
  2862. -------------------------
  2863. FindPort
  2864. Description:        finds a public message port
  2865. Library:        exec.library
  2866. Offset:         -$0186 (-390)
  2867. Modula-2 Module:    Ports
  2868. Syntax:         port = FindPort(name)
  2869. C:            struct MsgPort *FindPort(char *)
  2870. Machine Language:    d0 = FindPort(a1)
  2871. Modula-2:        FindPort(name: STRPTR): MsgPortPtr
  2872. Arguments:        name = NULL terminated string that specifies name of port
  2873. Result:         port = pointer to specified port; NULL if unsuccessful
  2874. -------------------------
  2875. FindResident
  2876. Description:        finds a Resident structure
  2877. Library:        exec.library
  2878. Offset:         -$0060 (-96)
  2879. Modula-2 Module:    Resident
  2880. Syntax:         resident = FindResident(name)
  2881. C:            struct Resident *FindResident(char *)
  2882. Machine Language:    d0 = FindResident(a1)
  2883. Modula-2:        FindResident(name: STRPTR): ResidentPtr
  2884. Arguments:        name = NULL terminated string that specifies name of Resident
  2885.             structure
  2886. Result:         resident = pointer to specified Resident structure; NULL if
  2887.             unsuccessful
  2888. -------------------------
  2889. FindSemaphore
  2890. Description:        finds a SignalSemaphore structure
  2891. Library:        exec.library
  2892. Offset:         -$0252 (-612)
  2893. Modula-2 Module:    Semaphores
  2894. Syntax:         semaphore = FindSemaphore(name)
  2895. C:            struct SignalSemaphore *FindSemaphore(char *)
  2896. Machine Language:    d0 = FindSemaphore(a1)
  2897. Modula-2:        FindSemaphore(name: STRPTR): SignalSemaphorePtr
  2898. Arguments:        name = NULL terminated string that specifies name of
  2899.             semaphore
  2900. Result:         semaphore = pointer to specified SignalSemaphore structure;
  2901.             NULL if unsuccessful
  2902. -------------------------
  2903. FindTask
  2904. Description:        finds a task
  2905. Library:        exec.library
  2906. Offset:         -$0126 (-294)
  2907. Modula-2 Module:    Tasks
  2908. Syntax:         task = FindTask(name)
  2909. C:            struct Task *FindTask(char *)
  2910. Machine Language:    d0 = FindTask(a1)
  2911. Modula-2:        FindTask(name: STRPTR): TaskPtr
  2912. Arguments:        name = NULL terminated string that specifies name of task
  2913. Result:         task = pointer to specified task; NULL if unsuccessful
  2914. -------------------------
  2915. FindToolType
  2916. Description:        finds value of a ToolType variable
  2917. Library:        icon.library
  2918. Offset:         -$0060 (-96)
  2919. Modula-2 Module:    Icon
  2920. Syntax:         value = FindToolType(toolTypeArray, typeName)
  2921. C:            struct char *FindToolType(char *, char *)
  2922. Machine Language:    d0 = FindToolType(a0, a1)
  2923. Modula-2:        FindToolType(toolTypeArray: StrArrayPtr; typeName: STRPTR):
  2924.             ADDRESS
  2925. Arguments:        toolTypeArray = pointer to an array of strings containing tool
  2926.             types
  2927.             typeName = NULL terminated string that specifies tool type to
  2928.             find
  2929. Result:         value = pointer to string containing specified tool type; NULL if
  2930.             typeName not found in toolTypeArray
  2931. -------------------------
  2932. Flood
  2933. Description:    floods (fills) an area of a RastPort
  2934. Library:    graphics.library
  2935. Offset:       -$014A (-330)
  2936. Modula-2 Module: Pens
  2937. Syntax:        Flood(rastPort, mode, x, y)
  2938. C:          void Flood(struct RastPort *, long, long, long)
  2939. Machine Language: Flood(a1, d2, d0, d1)
  2940. Modula-2:        Flood(rastPort: RastPortPtr; mode: LONGCARD; x, y: INTEGER)
  2941. Arguments:    rastPort = RastPort to fill
  2942.     mode = type of fill- 0 (fill pixels that are the same color as
  2943.     AOLPen) or 1 (fill pixels that are the same color as pixel at x,y)
  2944.     x = horizontal coordinate where fill will begin
  2945.     y = vertical coordinate where fill will begin
  2946.  
  2947. Result:         none
  2948. -------------------------
  2949. FlushCList
  2950. Description:        clears a character list
  2951. Library:        clist.library
  2952. Offset:         -$0030 (-48)
  2953. Modula-2 Module:    none
  2954. Syntax:         FlushCList(cList)
  2955. C:            void FlushCList(long)
  2956. Machine Language:    FlushCList(a0)
  2957. Modula-2:        not available
  2958. Arguments:        cList = CList header-as returned by AllocCList( )
  2959.             or StrToCL( )-used to manage character list to clear
  2960. Result:         none
  2961. -------------------------
  2962. Forbid
  2963. Description:        prevents task rescheduling
  2964. Library:        exec.library
  2965. Offset:         -$0084 (-132)
  2966. Modula-2 Module:    Interrupts
  2967. Syntax:         Forbid( )
  2968. C:            void Forbid(void)
  2969. Machine Language:    Forbid( )
  2970. Modula-2:        Forbid( )
  2971. Arguments:        none
  2972. Result:         none
  2973. -------------------------
  2974. fpa
  2975. Description:        converts a fast floating point number into an ASCII string
  2976. Library:        amiga.lib (linked library)
  2977. Modula-2 Module:    none
  2978. Syntax:         exp = fpa(fnum, string)
  2979. C:            long fpa(float, char *)
  2980. Machine Language:    pea string
  2981.             move.l fnum,-(sp)
  2982.             jsr _fpa ;exp returned in d0 and string equals fnum
  2983.             addq.l #8,sp
  2984. Modula-2:        not available
  2985. Arguments:        fnum = floating point number to convert
  2986.             string = address of string to receive ASCII equivalent of fnum
  2987.             argument
  2988. Result:         exp = integer exponent of fnum
  2989. -------------------------
  2990. fpbcd
  2991. Description:        converts a fast floating point number into BCD format
  2992. Library:        amiga.lib (linked library)
  2993. Modula-2 Module:    none
  2994. Syntax:         fpbcd(fnum, string)
  2995. C:            void fpbcd(float, char *)
  2996. Machine Language:    pea string
  2997.             move.l fnum,-(sp)
  2998.             jsr _fpbcd ;BCD equivalent of fnum returned in string
  2999.             addq.l #8,sp
  3000. Modula-2:        not available
  3001. Arguments:        fnum = floating point number to convert
  3002.             string = address of five-byte string to receive BCD equivalent of
  3003.             fnum argument
  3004. Result:         string argument receives the BCD equivalent of fnum argument
  3005. -------------------------
  3006. FreeBoardMem
  3007. Description:        frees expansion board memory (opposite of AllocBoardMem( )
  3008. Library:        expansion.library
  3009. Offset:         -$004E (-78)
  3010. Modula-2 Module:    Expansion
  3011. Syntax:         FreeBoardMem(startSlot, slotSpec)
  3012. C:            void FreeBoardMem(long, long)
  3013. Machine Language:    d0 = FreeBoardMem(d0, d1)
  3014. Modula-2:        FreeBoardMem(startslot, slotSpeC: INTEGER)
  3015. Arguments:        startSlot = slot number as returned by AllocBoardMem( )
  3016.             slotSpec = number of slots to free
  3017. Result:         none
  3018. -------------------------
  3019. Modula-2:        FreeMem(memoryBlock: ADDRESS: byteSize: LONGCARD)
  3020. Arguments:        memoryBlock = pointer to memory block to free
  3021.             byteSize = size of block in bytes
  3022. Result:         none
  3023. -------------------------
  3024. FreeCList
  3025. Description:        releases character list descriptor and any resources it uses
  3026. Library:        clist.library
  3027. Offset:         -$002A (-42)
  3028. Modula-2 Module:    none
  3029. Syntax:         FreeCList(cList)
  3030. C:            void FreeCList(long)
  3031. Machine Language:    FreeCList(a0)
  3032. Modula-2:        not available
  3033. Arguments:        cList = descriptor of character list to free
  3034. Result:         none
  3035. -------------------------
  3036. FreeColorMap
  3037. Description:        returns memory used by a ColorMap structure
  3038. Library:        graphics.library
  3039. Offset:         -$0240 (-576)
  3040. Modula-2 Module:    Views
  3041. Syntax:         FreeColorMap(colorMap)
  3042. C:            void FreeColorMap(struct ColorMap *)
  3043. Machine Language:    FreeColorMap(a0)
  3044. Modula-2:        FreeColorMap(colorMap: ColorMapPtr)
  3045. Arguments:        colorMap = ColorMap structure to free
  3046. Result:         none
  3047. -------------------------
  3048. FreeConfigDev
  3049. Description:        frees a ConfigDev structure
  3050. Library:        expansion.library
  3051. Offset:         -$0054 (-84)
  3052. Modula-2 Module:    ConfigVars
  3053. Syntax:         FreeConfigDev(configDev)
  3054. C:            void FreeConfigDev(struct ConfigDev *)
  3055. Machine Language:    FreeConfigDev(a0)
  3056. Modula-2:        FreeConfigDev(configDev: ConfigDevPtr)
  3057. Arguments:        configDev = ConfigDev structure as returned by AllocConfigDev( )
  3058. Result:         none
  3059. -------------------------
  3060. FreeCopList
  3061. Description:        returns memory allocated for an intermediate copper list
  3062. Library:        graphics.library
  3063. Offset:         -$0222 (-546)
  3064. Modula-2 Module:    Copper
  3065. Syntax:         FreeCopList(copList)
  3066. C:            void FreeCopList(struct CopList *)
  3067. Machine Language:    FreeCopList(a0)
  3068. Modula-2:        FreeCopList(copList: CopListPtr)
  3069. Arguments:        copList = CopList structure to free
  3070. Result:         none
  3071. -------------------------
  3072. FreeCprList
  3073. Description:        returns memory allocated for a hardware copper list
  3074. Library:        graphics.library
  3075. Offset:         -$0234 (-564)
  3076. Modula-2 Module:    Copper
  3077. Syntax:         FreeCprList(cprlist)
  3078. C:            void FreeCprList(struct cprlist *)
  3079. Machine Language:    FreeCprList(a0)
  3080. Modula-2:        FreeCprList(cprlist: cprlistPtr)
  3081. Arguments:        cprlist = cprlist structure to free
  3082. Result:         none
  3083. -------------------------
  3084. FreeDiskObject
  3085. Description:        frees memory allocated for a Workbench disk object
  3086. Library:        icon.library
  3087. Offset:         -$005A (-90)
  3088. Modula-2 Module:    Icon
  3089. Syntax:         FreeDiskObject(diskObj)
  3090. C:            void FreeDiskObject(struct DiskObject *)
  3091. Machine Language:    FreeDiskObject(a0)
  3092. Modula-2:        FreeDiskObject(diskObj: DiskObjectPtr)
  3093. Arguments:        diskObj = DiskObject structure to free
  3094. Result:         none
  3095. -------------------------
  3096. FreeEntry
  3097. Description:        frees many regions of memory
  3098. Library:        exec.library
  3099. Offset:         -$00E4 (-228)
  3100. Modula-2 Module:    Memory
  3101. Syntax:         FreeEntry(memList)
  3102. C:            void FreeEntry(struct MemList *)
  3103. Machine Language:    FreeEntry(a0)
  3104. Modula-2:        FreeEntry(memList: MemListPtr)
  3105. Arguments:        memList = MemList structure
  3106. Result:         none
  3107. -------------------------
  3108. FreeExpansionMem
  3109. Description:        frees expansion memory
  3110. Library:        expansion.library
  3111. Offset:         -$005A (-90)
  3112. Modula-2 Module:    Expansion
  3113. Syntax:         FreeExpansionMem(startSlot, numSlots)
  3114. C:            void FreeExpansionMem(long, long)
  3115. Machine Language:    FreeExpansionMem(d0, d1)
  3116. Modula-2:        FreeExpansionMem(startSlot, numSlots: INTEGER)
  3117. Arguments:        startSlot = slot number as returned by AllocExpansionMem( )
  3118.             slotSpec = number of slots to free
  3119. Result:         none
  3120. -------------------------
  3121. FreeFreeList
  3122. Description:        frees all memory in a free list
  3123. Library:        icon.library
  3124. Offset:         -$0036 (-54)
  3125. Modula-2 Module:    Icon
  3126. Syntax:         FreeFreeList(freeList)
  3127. C:            void FreeFreeList(struct FreeList *)
  3128. Machine Language:    FreeFreeList(a0)
  3129. Modula-2:        FreeFreeList(freeList: FreeListPtr)
  3130. Arguments:        memList = FreeList structure
  3131. Result:         none
  3132. -------------------------
  3133. FreeGBuffers
  3134. Description:        frees memory allocated by GetGBuffers( )
  3135. Library:        graphics.library
  3136. Offset:         -$0258 (-600)
  3137. Modula-2 Module:    Gels
  3138. Syntax:         FreeGBuffers(animOb, rastPort, dBuffer)
  3139. C:            void FreeGBuffers(struct AnimOb *, struct RastPort *, long)
  3140. Machine Language:    FreeGBuffers(a0, a1, d0)
  3141. Modula-2:        FreeGBuffers(animOb: AnimObPtr; rastPort: RastPortPtr; dBuffer:
  3142.             BOOLEAN)
  3143. Arguments:        animOb = AnimOb structure
  3144.             rastPort = Rastport structure
  3145.             dBuffer = double-buffer flag-TRUE for double-buffering
  3146. Result:         none
  3147. -------------------------
  3148. FreeMem
  3149. Description:        frees memory allocated by GetGBuffers( )
  3150. Library:        exec.library
  3151. Offset:         -$00D2 (-210)
  3152. Modula-2 Module:    Memory
  3153. Syntax:         FreeMem(memoryBlock, byteSize)
  3154. C:            void FreeMem(void *, long)
  3155. Machine Language:    FreeMem(a1, d0)
  3156. Modula-2:        FreeMem(memoryBlock: ADDRESS: byteSize: LONGCARD)
  3157. Arguments:        memoryBlock = pointer to memory block to free
  3158.             byteSize = size of block in bytes
  3159. Result:         none
  3160. -------------------------
  3161. FreeRaster
  3162. Description:        frees memory allocated by AllocRaster( )
  3163. Library:        graphics.library
  3164. Offset:         -$01F2 (-498)
  3165. Modula-2 Module:    Rasters
  3166. Syntax:         FreeRaster(p, width, height)
  3167. C:            void FreeRaster(PLANEPTR, long, long)
  3168. Machine Language:    FreeRaster(a0, d0, d1)
  3169. Modula-2:        FreeRaster(p: PlanePtr; width, height: CARDINAL)
  3170. Arguments:        p = memory block returned by AllocRaster( )
  3171.         width = width of bitplanes in pixels
  3172.         height = height of bitplanes in pixels
  3173. Result:         none
  3174. -------------------------
  3175. FreeRemember
  3176. Description:        frees memory allocated by AllocRemember( )
  3177. Library:        intuition.library
  3178. Offset:         -$0198 (-408)
  3179. Modula-2 Module:    Intuition
  3180. Syntax:         FreeRemember(rememberKey, reallyForget)
  3181. C:            void FreeRemember(struct Remember *, long)
  3182. Machine Language:    FreeRemember(a0, d0)
  3183. Modula-2:        FreeRemember(rememberKey: RememberPrt; reallyForget:
  3184.             BOOLEAN)
  3185. Arguments:        rememberKey = address of pointer to Remember structure
  3186.             reallyForget = TRUE to free memory and link nodes; FALSE to
  3187.             free only link nodes
  3188. Result:         none
  3189. -------------------------
  3190. FreeSignal
  3191. Description:        frees a signal bit
  3192. Library:        exec.library
  3193. Offset:         -$0150 (-336)
  3194. Modula-2 Module:    Tasks
  3195. Syntax:         FreeSignal(signalNum)
  3196. C:            void FreeSignal(long)
  3197. Machine Language:    FreeSignal(d0)
  3198. Modula-2:        FreeSignal(signalNum: SIGNAL)
  3199. Arguments:        signalNum = signal number to free (0-31)
  3200. Result:         none
  3201. -------------------------
  3202. FreeSprite
  3203. Description:        makes sprite available for others to use
  3204. Library:        graphics.library
  3205. Offset:         -$019E (-414)
  3206. Modula-2 Module:    Sprites
  3207. Syntax:         FreeSprite(pick)
  3208. C:            void FreeSprite(long)
  3209. Machine Language:    FreeSprite(d0)
  3210. Modula-2:        FreeSprite(pick: INTEGER)
  3211. Arguments:        pick = number of sprite to free (0-7)
  3212. Result:         none
  3213. -------------------------
  3214. FreeSysRequest
  3215. Description:        frees memory allocated by BuildSysRequest( )
  3216. Library:        intuition.library
  3217. Offset:         -$0174 (-372)
  3218. Modula-2 Module:    Intuition
  3219. Syntax:         FreeSysRequest(window)
  3220. C:            void FreeSysRequest(struct Window *)
  3221. Machine Language:    FreeSysRequest(a0)
  3222. Modula-2:        FreeSysRequest(window: WindowPtr)
  3223. Arguments:        window = Window structure as returned by BuildSysRequest( )
  3224. Result:         none
  3225. -------------------------
  3226. FreeTrap
  3227. Description:        frees a processor trap
  3228. Library:        exec.library
  3229. Offset:         -$015C (-348)
  3230. Modula-2 Module:    Tasks
  3231. Syntax:         FreeTrap(trapNum)
  3232. C:            void FreeTrap(long)
  3233. Machine Language:    FreeTrap(d0)
  3234. Modula-2:        FreeTrap(trapNum: TRAP)
  3235. Arguments:        trapNum = trap number to free (0-15)
  3236. Result:         none
  3237. -------------------------
  3238. FreeVPortCoplists
  3239. Description:        frees all intermediate copper lists and their headers from a
  3240.             ViewPort
  3241. Library:        graphics.library
  3242. Offset:         -$021C (-540)
  3243. Modula-2 Module:    Views
  3244. Syntax:         FreeVPortCopLists(viewPort)
  3245. C:            void FreeVPortCopLists(struct ViewPort *)
  3246. Machine Language:    FreeVPortCopLists(a0)
  3247. Modula-2:        FreeVPortCopLists(viewPort: ViewPortPtr)
  3248. Arguments:        viewPort = ViewPort structure containing copper lists
  3249. Result:         none
  3250. -------------------------
  3251. FreeWBObject
  3252. Description:        frees memory allocated for a Workbench object
  3253. Library:        icon.library
  3254. Offset:         -$003C (-60)
  3255. Modula-2 Module:    none
  3256. Syntax:         FreeWBObject(object)
  3257. C:            void FreeWBObject(struct WBObject *)
  3258. Machine Language:    FreeWBObject(a0)
  3259. Modula-2:        not available
  3260. Arguments:        object = WBObject structure to free
  3261. Result:         none
  3262. --------------------------
  3263. GetCC
  3264. Description:        gets 68000/68010 condition codes
  3265. Library:        exec.library
  3266. Offset:         -$0210 (-528)
  3267. Modula-2 Module:    Exec
  3268. Syntax:         condition = GetCC( )
  3269. C:            long GetCC(void)
  3270. Machine Language:    d0 = GetCC( )
  3271. Modula-2:        GetCC( ): BITSET
  3272. Arguments:        none
  3273. Result:         condition = 68000/68010 condition code
  3274. -------------------------
  3275. GetCLBuf
  3276. Description:        converts character list into contiguous data
  3277. Library:        clist.library
  3278. Offset:         -$0072 (-114)
  3279. Modula-2 Module:    none
  3280. Syntax:         length = GetCLBuf(cList, buffer, maxLength)
  3281. C:            long GetCLBuf(long, char *, long)
  3282. Machine Language:    d0 = GetCLBuf(a0, a1, d1)
  3283. Modula-2:        not available
  3284. Arguments:        cList = character list descriptor, as returned by AllocCList( ) or
  3285.             StrToCL( )
  3286.             buffer = buffer to hold data
  3287.             maxLength = maximum size of buffer in bytes
  3288. Result:         length = number of bytes copied into buffer
  3289. -------------------------
  3290. GetCLChar
  3291. Description:        gets a byte from the beginning of a character list
  3292. Library:        clist.library
  3293. Offset:         -$0042 (-66)
  3294. Modula-2 Module:    none
  3295. Syntax:         byte = GetCLChar(cList)
  3296. C:            long GetCLChar(long)
  3297. Machine Language:    d0 = GetCLChar(a0)
  3298. Modula-2:        not available
  3299. Arguments:        cList = character list descriptor, as returned by AllocCList( ) or
  3300.             StrToCL( )
  3301. Result:         byte = byte from beginning of character list; -1 if no data
  3302. -------------------------
  3303. GetCLWord
  3304. Description:        gets a word from the beginning of a character list
  3305. Library:        clist.library
  3306. Offset:         -$005A (-90)
  3307. Modula-2 Module:    none
  3308. Syntax:         word = GetCLWord(cList)
  3309. C:            long GetCLWord(long)
  3310. Machine Language:    d0 = GetCLWord(a0)
  3311. Modula-2:        not available
  3312. Arguments:        cList = character list descriptor, as returned by AllocCList( ) or
  3313.             StrToCL( )
  3314. Result:         word = word from beginning of character list; -1 if no data
  3315. -------------------------
  3316. GetColorMap
  3317. Description:        allocates and initializes a ColorMap structure
  3318. Library:        graphics.library
  3319. Offset:         -$023A (-570)
  3320. Modula-2 Module:    Views
  3321. Syntax:         colorMap = GetColorMap(entries)
  3322. C:            struct ColorMap *GetColorMap(long)
  3323. Machine Language:    d0 = GetColorMap(d0)
  3324. Modula-2:        GetColorMap(colorMap: LONGINT): ColorMapPtr
  3325. Arguments:        entries = number of entries for this color map
  3326. Result:         colorMap = pointer to ColorMap structure; O if unsuccessful
  3327. -------------------------
  3328. GetCurrentBinding
  3329. Description:        sets static board configuration area
  3330. Library:        expansion.library
  3331. Offset:         -$008A (-138)
  3332. Modula-2 Module:    none
  3333. Syntax:         actual = GetCurrentBinding(currentBinding, size)
  3334. C:            long GetCurrentBinding(long, long)
  3335. Machine Language:    d0 = GetCurrentBinding(a0, d0)
  3336. Modula-2:        not available
  3337. Arguments:        currentBinding = CurrentBinding structure
  3338.             size = size of user's BindDriver structure
  3339. Result:         actual = actual size of the CurrentBinding structure
  3340. -------------------------
  3341. GetDefPrefs
  3342. Description:        gets a copy of the default Preferences
  3343. Library:        intuition.library
  3344. Offset:         -$007E (-126)
  3345. Modula-2 Module:    Preferences
  3346. Syntax:         prefBuffer = GetDefPrefs(prefBuffer, size)
  3347. C:            struct Preferences *GetDefPrefs(struct Preferences *, long)
  3348. Machine Language:    d0 = GetDefPrefs(a0, d0)
  3349. Modula-2:        GetDefPrefs(prefBuffer: ADDRESS; size: INTEGER): ADDRESS
  3350. Arguments:        prefBuffer = buffer to receive copy of default Preferences
  3351.             size = size of buffer in bytes
  3352. Result:         prefBuffer = pointer to your buffer
  3353. -------------------------
  3354. GetDiskObject
  3355. Description:        reads a Workbench DiskObject (.info file) from disk
  3356. Library:        icon.library
  3357. Offset:         -$004E (-78)
  3358. Modula-2 Module:    Icon
  3359. Syntax:         diskObj = GetDiskObject(name)
  3360. C:            struct DiskObject *GetDiskObject(char *)
  3361. Machine Language:    d0 = GetDiskObject(a0)
  3362. Modula-2:        GetDiskObject(name: STRPTR): DiskObjectPtr
  3363. Arguments:        name = name of Workbench object (.info file)
  3364. Result:         diskObj = pointer to DiskObject structure; 0 if unsuccessful
  3365. -------------------------
  3366. GetGBuffers
  3367. Description:        attempts to allocate all buffers of an enter AnimOb
  3368. Library:        graphics.library
  3369. Offset:         -$00A8 (-168)
  3370. Modula-2 Module:    Gels
  3371. Syntax:         success = GetGBuffers(animOb, rastPort, dBuffer)
  3372. C:            long GetGBuffers(struct AnimOb *, struct RastPort *, long)
  3373. Machine Language:    d0 = GetGBuffers(a0, a1, d0)
  3374. Modula-2:        GetGBuffers(animOb: AnimObPtr; rastPort: RastPortPtr; dBuffer:
  3375.             BOOLEAN): BOOLEAN
  3376. Arguments:        animOb = AnimOb structure
  3377.             rastPort = Rastport structure
  3378.             dBuffer = double-buffer flag-TRUE for double-buffering
  3379. Result:         success = TRUE if successful; FALSE if unsuccessful
  3380. -------------------------
  3381. GetIcon
  3382. Description:        reads a DiskObject structure from disk
  3383. Library:        icon.library
  3384. Offset:         -$002A (-42)
  3385. Modula-2 Module:    none
  3386. Syntax:         status = GetIcon(name, icon, free)
  3387. C:            long GetIcon(char *, struct DiskObject *, struct FreeList *)
  3388. Machine Language:    d0 = GetIcon(a0, a1, a2)
  3389. Modula-2:        not available
  3390. Arguments:        name = name of icon (.info file)
  3391.             icon = DiskObject structure
  3392.             free = FreeList structure
  3393. Result:         status = nonzero if successful
  3394. -------------------------
  3395. GetMsg
  3396. Description:        gets next message from a message port
  3397. Library:        exec.library
  3398. Offset:         -$0174 (-372)
  3399. Modula-2 Module:    Ports
  3400. Syntax:         message = GetMsg(port)
  3401. C:            struct Message *GetMsg(struct MsgPort *)
  3402. Machine Language:    d0 = GetMsg(a0)
  3403. Modula-2:        GetMsg(port: MsgPortPtr): ADDRESS
  3404. Arguments:        port = receiving message port
  3405. Result:         message = pointer to first message; NULL if no message
  3406. -------------------------
  3407. GetPrefs
  3408. Description:        gets Preferences' current settings
  3409. Library:        intuition.library
  3410. Offset:         -$0084 (-132)
  3411. Modula-2 Module:    Preferences
  3412. Syntax:         prefBuffer = GetDefPrefs(prefBuffer, size)
  3413. C:            struct Preferences *GetDefPrefs(struct Preferences *, long)
  3414. Machine Language:    d0 = GetDefPrefs(a0, d0)
  3415. Modula-2:        GetDefPrefs(prefBuffer: ADDRESS; size: INTEGER): ADDRESS
  3416. Arguments:        prefBuffer = buffer to receive copy of Preferences
  3417.             size = size of buffer in bytes
  3418. Result:         prefBuffer = pointer to your buffer
  3419. -------------------------
  3420. GetRGB4
  3421. Description:        gets the value of an entry in a ColorMap structure
  3422. Library:        graphics.library
  3423. Offset:         -$0246 (-582)
  3424. Modula-2 Module:    Views
  3425. Syntax:         value = GetRGB4(colorMap, entry)
  3426. C:            long GetRGB4(struct ColorMap *, long)
  3427. Machine Language:    d0 = GetRGB4(a0, d0)
  3428. Modula-2:        GetRGB4(colorMap: ColorMapPtr; entry: LONGINT): INTEGER
  3429. Arguments:        colorMap = ColorMap structure
  3430.             entry = index into color table, specifying desired entry
  3431. Result:         value = two-byte, right-justified RGB value with four bits per
  3432.             color-red, green, blue; -1 if no valid entry
  3433. -------------------------
  3434. GetSereenData
  3435. Description:        copies all or part of a Screen structure into buffer; opens specifled
  3436.             screen if not already open
  3437. Library:        intuition.library
  3438. Offset:         -$01AA (-426)
  3439. Modula-2 Module:    Intuition
  3440. Syntax:         success = GetScreenData(buffer, size, type, screen)
  3441. C:            long GetScreenData(char *, long, long, struct Screen *)
  3442. Machine Language:    d0 = GetScreenData(a0, d0, d1, a1)
  3443. Modula-2:        GetScreenData(buffer: ADDRESS; size: CARDINAL; type:
  3444.             ScreenFlagSet; screen: ScreenPtr): BOOLEAN
  3445. Arguments:        buffer = buffer in which data will be placed
  3446.             size = size of buffer in bytes
  3447.             type = screen type-CUSTOMSCREEN, WORKBENCHSCREEN
  3448.             screen = custom Screen structure; ignored if type argument
  3449.             equals WORKBENCHSCREEN
  3450.  
  3451. Result:         success = TRUE if successful; FALSE if screen not available and
  3452.             could not be opened
  3453. -------------------------
  3454. GetSprite
  3455. Description:        allocates hardware sprite for simple sprite manager
  3456. Library:        graphics.library
  3457. Offset:         -$0198 (-408)
  3458. Modula-2 Module:    Sprites
  3459. Syntax:         spriteNumber = GetSprite(sprite, pick)
  3460. C:            long GetSprite(struct SimpleSprite *, long)
  3461. Machine Language:    d0 = GetSprite(a0, d0)
  3462. Modula-2:        GetSprite(sprite: SimpleSpritePtr; pick: INTEGER): INTEGER
  3463. Arguments:        sprite = SimpleSprite structure
  3464.             pick = number of desired sprite (0-7); -1 for next available
  3465.             sprite
  3466. Result:         spriteNumber = number of sprite allocated; -1 if sprite
  3467.             unavailable
  3468. -------------------------
  3469. GetWBObject
  3470. Description:        reads in a Workbench object from disk
  3471. Library:        icon.library
  3472. Offset:         -$001E (-30)
  3473. Modula-2 Module:    none
  3474. Syntax:         object = GetWBObject(name)
  3475. C:            struct WBObject *GetWBObject(char *)
  3476. Machine Language:    d0 = GetWBObject(a0)
  3477. Modula-2:        not available
  3478. Arguments:        name = NULL terminated string that specifies name of Work-
  3479.             bench object
  3480. Result:         object = pointer to Workbench object; 0 if unsuccessful
  3481. -------------------------
  3482. IEEEDPAbs
  3483. Description:        obtains the absolute value of an IEEE double-precision floating-
  3484.             point number
  3485. Library:        mathieeedoubbas.library
  3486. Offset:         -$0036 (-54)
  3487. Modula-2 Module:    none
  3488. Syntax:         fnum1 = IEEEDPAbs(fnum2)
  3489. C:            double IEEEDPAbs(double)
  3490. Machine Language:    d0/d1 = IEEEDPAbs(d0/d1)
  3491. Modula-2:        not available
  3492. Arguments:        fnum2 = IEEE double-precision floating-point number
  3493. Result:         fnum1 = absolute value of fnum2 in IEEE double-precision
  3494.             floating-point format
  3495. -------------------------
  3496. IEEEDPAcos
  3497. Description:        obtains the arccosine of an IEEE double-precision floating-point
  3498.             number
  3499. Library:        mathieeedoubtrans.library
  3500. Offset:         -$0078 (-120)
  3501. Modula-2 Module:    none
  3502. Syntax:         fnum1 = IEEEDPAcos(fnum2)
  3503. C:            double IEEEDPAcos(double)
  3504. Machine Language:    d0/d1 = IEEEDPAcos(d0/d1)
  3505. Modula-2:        not available
  3506. Arguments:        fnum2 = IEEE double-precision floating-point number represent-
  3507.             ing the cosine of an angle
  3508. Result:         fnum1 = IEEE double-precision floating-point value of fnum2 an-
  3509.             gle in radians
  3510. -------------------------
  3511. IEEEDPAdd
  3512. Description:        adds two IEEE double-precision floating-point numbers
  3513. Library:        mathieeedoubbas.library
  3514. Offset:         -$0042 (-66)
  3515. Modula-2 Module:    none
  3516. Syntax:         fnum1 = IEEEDPAdd(fnum2, fnum3)
  3517. C:            double IEEEDPAdd(double, d0uble)
  3518. Machine Language:    d0/d1 = IEEEDPAdd(d0/d1, d2/d3)
  3519. Modula-2:        not available
  3520. Arguments:        fnum2 = IEEE double-precision floating-point number
  3521.             fnum3 = IEEE double-precision floating-point number
  3522. Result:         fnum1 = fnum2 plus fnum3 in IEEE double-precision floating-
  3523.             point format
  3524. -------------------------
  3525. IEEEDPAsin
  3526. Description:        obtains the arcsine of an IEEE double-precision floating-point
  3527.             number
  3528. Library:        mathieeedoubtrans.library
  3529. Offset:         -$0072 (-114)
  3530. Modula-2 Module:    none
  3531. Syntax:         fnum2 = IEEEDPAsin(fnum2)
  3532. C:            double IEEEDPAsin(double)
  3533. Machine Language:    d0/d1 = IEEEDPAsin(d0/d1)
  3534. Modula-2:        not available
  3535. Arguments:        fnum2 = IEEE double-precision floating-point number represent-
  3536.             ing the sine of an angle
  3537. Result:         fnum1 = IEEE double-precision floating-point value of fnum2 an-
  3538.             gle in radians
  3539. -------------------------
  3540. IEEEDPAtan
  3541. Description:        obtains the arctangent of an IEEE double-precision floating-point
  3542.             number
  3543. Library:        mathieeedoubtrans.library
  3544. Offset:         -$0030 (-48)
  3545. Modula-2 Module:    none
  3546. Syntax:         fnum1 = IEEEDPAtan(fnum2)
  3547. C:            double IEEEDPAtan(double)
  3548. Machine Language:    d0/d1 = IEEEDPAtan(d0/d1)
  3549. Modula-2:        not available
  3550. Arguments:        fnum2 = IEEE double-precision floating-point number represent-
  3551.             ing the tangent of an angle
  3552. Result:         fnum1 = IEEE double-precision floating-point value of fnum2 an-
  3553.             gle in radians
  3554. -------------------------
  3555. IEEEDPCeil
  3556. Description:        obtains the Ceil function of an IEEE double-precision floating-
  3557.             point number (rounds it up)
  3558. Library:        mathieeedoubbas.library
  3559. Offset:         -$0060 (-96)
  3560. Modula-2 Module:    none
  3561. Syntax:         fnum1 = IEEEDPCeil(fnum2)
  3562. C:            double IEEEDPCeil(double)
  3563. Machine Language:    d0/d1 = IEEEDPCeil(d0/d1)
  3564. Modula-2:        not available
  3565. Arguments:        fnum2 = IEEE double-precision floating-point number
  3566. Result:         fnum1 = IEEE double-precision floating-point integer value that's
  3567.             closest to, but not less than the value of fnum2
  3568. -------------------------
  3569. IEEEDPCmp
  3570. Description:        compares two IEEE double-precision floating-point numbers
  3571. Library:        mathieeedoubbas.library
  3572. Offset:         -$002A (-42)
  3573. Modula-2 Module:    none
  3574. Syntax:         flag = IEEEDPCmp(fnum1, fnum2)
  3575. C:            long IEEEDPCmp(double, d0uble)
  3576. Machine Language:    d0 = IEEEDPCmp(d0/d1, d2/d3)
  3577. Modula-2:        not available
  3578. Arguments:        fnum1 = IEEE double-precision floating-point number
  3579.             fnum2 = IEEE double-precision floating-point number
  3580. Result:         flag = -1 if fnum1<fnum2; +1 if fnum1>fnum2; 0 if
  3581.             fnum1 = fnum2
  3582. -------------------------
  3583. IEEEDPCos
  3584. Description:        obtains the cosine of an IEEE double-precision floating-point
  3585.             number
  3586. Library:        mathieeedoubtrans.library
  3587. Offset:         -$002A (-42)
  3588. Modula-2 Module:    none
  3589. Syntax:         fnum1 = IEEEDPCos(fnum2)
  3590. C:            double IEEEDPCos(double)
  3591. Machine Language:    d0/d1 = IEEEDPCos(d0/d1)
  3592. Modula-2:        not available
  3593. Arguments:        fnum2 = IEEE double-precision floating-point number represent-
  3594.             ing an angle in radians
  3595. Result:         fnum1 = IEEE double-precision floating-point cosine of fnum2
  3596. -------------------------
  3597. IEEEDPCosh
  3598. Description:        obtains the hyperbolic cosine of an IEEE double-precision float-
  3599.             ing-point number
  3600. Library:        mathieeedoubtrans.library
  3601. Offset:         -$0042 (-66)
  3602. Modula-2 Module:    none
  3603. Syntax:         fnum1 = IEEEDPCosh(fnum2)
  3604. C:            double IEEEDPCosh(double)
  3605. Machine Language:    d0/d1 = IEEEDPCosh(d0/d1)
  3606. Modula-2:        not available
  3607. Arguments:        fnum2 = IEEE double-precision floating-point number represent-
  3608.             ing an angle in radians
  3609. Result:         fnum1 = IEEE double-precision floating-point hyperbolic cosine
  3610.             of fnum2
  3611. -------------------------
  3612. IEEEDPDiv
  3613. Description:        divides one IEEE double-precision floating-point number by
  3614.             another
  3615. Library:        mathieeedoubbas.library
  3616. Offset:         -$0054 (-84)
  3617. Modula-2 Module:    none
  3618. Syntax:         fnum1 = IEEEDPDiv(fnum2, fnum3)
  3619. C:            double IEEEDPDiv(double, d0uble)
  3620. Machine Language:    d0/d1 = IEEEDPDiv(d0/d1, d2/d3)
  3621. Modula-2:        not available
  3622. Arguments:        fnum2 = IEEE double-precision floating-point dividend
  3623.             fnum3 = IEEE double-precision floating-point divisor
  3624. Result:         fnum1 = IEEE double-precision floating-point format results of
  3625.             fnum2 divided by fnum3
  3626. -------------------------
  3627. IEEEDPExp
  3628. Description:        obtains the exponent of an IEEE double-precision floating-point
  3629.             number
  3630. Library:        mathieeedoubtrans.library
  3631. Offset:         -$004E (-78)
  3632. Modula-2 Module:    none
  3633. Syntax:         fnum1 = IEEEDPExp(fnum2)
  3634. C:            double IEEEDPExp(double)
  3635. Machine Language:    d0/d1 = IEEEDPExp(d0/d1)
  3636. Modula-2:        not available
  3637. Arguments:        fnum2 = IEEE double-precision floating-point number
  3638. Result:         fnum1 = IEEE double-precision floating-point value representing
  3639.             e raised to the power of fnum2
  3640. -------------------------
  3641. IEEEDPFieee
  3642. Description:        converts a IEEE single-precision floating-point number to an IEEE
  3643.             double-precision floating-point number
  3644. Library:        mathieeedoubtrans.library
  3645. Offset:         -$006C (-108)
  3646. Modula-2 Module:    none
  3647. Syntax:         fnum1 = IEEEDPFieee(fnum2)
  3648. C:            double IEEEDPFieee(float)
  3649. Machine Language:    d0/d1 = IEEEDPFieee(d0)
  3650. Modula-2:        not available
  3651. Arguments:        fnum2 = IEEE single-precision floating-point number
  3652. Result:         fnum1 = IEEE double-precision floating-point equivalent to
  3653.             fnum2
  3654. -------------------------
  3655. IEEEDPFix
  3656. Description:        converts an IEEE double-precision floating-point number to an
  3657.             integer
  3658. Library:        mathieeedoubbas.library
  3659. Offset:         -$001E (-30)
  3660. Modula-2 Module:    none
  3661. Syntax:         inum = IEEEDPFix(fnum)
  3662. C:            long IEEEDPFix(double)
  3663. Machine Language:    d0 = IEEEDPFix(d0/d1)
  3664. Modula-2:        not available
  3665. Arguments:        fnum = IEEE double-precision floating-point number
  3666. Result:         inum = integer equivalent to fnum
  3667. -------------------------
  3668. IEEEDPFloor
  3669. Description:        obtains the Floor function of an IEEE double-precision floating-
  3670.             point number (rounds it down)
  3671. Library:        mathieeedoubbas.library
  3672. Offset:         -$005A (-90)
  3673. Modula-2 Module:    none
  3674. Syntax:         fnum1 = IEEEDPFloor(fnum2)
  3675. C:            double IEEEDPFloor(double)
  3676. Machine Language:    d0/d1 = IEEEDPFloor(d0/d1)
  3677. Modula-2:        not available
  3678. Arguments:        fnum2 = IEEE double-precision floating-point number
  3679. Result:         fnum1 = IEEE double-precision floating-point integer value that's
  3680.             closest to, but not greater than the value of fnum2
  3681. -------------------------
  3682. IEEEDPFlt
  3683. Description:        converts an integer to an IEEE double-precision floating-point
  3684.             number
  3685. Library:        mathieeedoubbas.library
  3686. Offset:         -$0024 (-36)
  3687. Modula-2 Module:    none
  3688. Syntax:         fnum = IEEEDPFlt(inum)
  3689. C:            double IEEEDPFlt(long)
  3690. Machine Language:    d0/d1 = IEEEDPFlt(d0)
  3691. Modula-2:        not available
  3692. Arguments:        inum = signed integer to be converted
  3693. Result:         fnum = IEEE double-precision floating-point equivalent to inum
  3694. -------------------------
  3695. IEEEDPLog
  3696. Description:        obtains the natural logarithm of an IEEE double-precision floating-
  3697.             point number
  3698. Library:        mathieeedoubtrans.library
  3699. Offset:         -$0054 (-84)
  3700. Modula-2 Module:    none
  3701. Syntax:         fnum1 = IEEEDPLog(fnum2)
  3702. C:            double IEEEDPLog(double)
  3703. Machine Language:    d0/d1 = IEEEDPLog(d0/d1)
  3704. Modula-2:        not available
  3705. Arguments:        fnum2 = IEEE double-precision floating-point number
  3706. Result:         fnum1 = IEEE double-precision floating-point natural logarithm
  3707.             (base e) of fnum2
  3708. -------------------------
  3709. IEEEDPlog10
  3710. Description:        obtains the naparian logarithm (base 10) of an IEEE double-
  3711.             precision floating-point number
  3712. Library:        mathieeedoubtrans.library
  3713. Offset:         -$007E (-126)
  3714. Modula-2 Module:    none
  3715. Syntax:         fnum1 = IEEEDPLog10(fnum2)
  3716. C:            double IEEEDPLog10(double)
  3717. Machine Language:    d0/d1 = IEEEDPLog10(d0/d1)
  3718. Modula-2:        not available
  3719. Arguments:        fnum2 = IEEE double-precision floating-point number
  3720. Result:         fnum1 = IEEE double-precision floating-point naparian logarithm
  3721.             (base 10) of fnum2
  3722. -------------------------
  3723. IEEEDPMul
  3724. Description:        multiplies one IEEE double-precision floating-point number by
  3725.             another
  3726. Library:        mathieeedoubbas.library
  3727. Offset:         -$004E (-78)
  3728. Modula-2 Module:    none
  3729. Syntax:         fnum1 = IEEEDPMul(fnum2, fnum3)
  3730. C:            double IEEEDPMul(double, d0uble)
  3731. Machine Language:    d0/d1 = IEEEDPMul(d0/d1, d2/d3)
  3732. Modula-2:        not available
  3733. Arguments:        fnum2 = IEEE double-precision floating-point number
  3734.             fnum3 = IEEE double-precision floating-point number
  3735. Result:         fnum1 = product of fnum2 and fnum3 in IEEE double-precision
  3736.             floating-point format
  3737. -------------------------
  3738. IEEEDPNeg
  3739. Description:        negates the value of an IEEE double-precision floating-point number
  3740. Library:        mathieeedoubbas.library
  3741. Offset:         -$003C (-60)
  3742. Modula-2 Module:    none
  3743. Syntax:         fnum1 = IEEEDPNeg(fnum2)
  3744. C:            double IEEEDPNeg(double)
  3745. Machine Language:    d0/d1 = IEEEDPNeg(d0/d1)
  3746. Modula-2:        not available
  3747. Arguments:        fnum2 = IEEE double-precision floating-point number to negate
  3748. Result:         fnum1 = negative fnum2 in IEEE double-precision floating-point
  3749.             format
  3750. -------------------------
  3751. IEEEDPPow
  3752. Description:        obtains the exponentiation of two IEEE double-precision floating-
  3753.             point numbers
  3754. Library:        mathieeedoubtrans.library
  3755. Offset:         -$005A (-90)
  3756. Modula-2 Module:    none
  3757. Syntax:         fnum1 = IEEEDPPow(fnum2, fnum3)
  3758. C:            double IEEEDPPow(double, d0uble)
  3759. Machine Language:    d0/d1 = IEEEDPPow(d2/d3, d0/d1)
  3760. Modula-2:        not available
  3761. Arguments:        fnum2 = IEEE double-precision floating-point number
  3762.             fnum3 = IEEE double-precision floating-point number
  3763. Result:         fnum1 = IEEE double-precision floating-point value of fnum2
  3764.             raised to the power of fnum3
  3765. -------------------------
  3766. IEEEDPSin
  3767. Description:        obtains the sine of an IEEE double-precision floating-point
  3768.             number
  3769. Library:        mathieeedoubtrans.library
  3770. Offset:         -$0024 (-36)
  3771. Modula-2 Module:    none
  3772. Syntax:         fnum1 = IEEEDPSin(fnum2)
  3773. C:            double IEEEDPSin(double, d0uble)
  3774. Machine Language:    d0/d1 = IEEEDPSin(d0/d1)
  3775. Modula-2:        not available
  3776. Arguments:        fnum2 = IEEE double-precision floating-point number represent-
  3777.             ing an angle in radians
  3778. Result:         fnum1 = IEEE double-precision floating-point sine of fnum2
  3779. -------------------------
  3780. IEEEDPSincos
  3781. Description:        obtains the sine and cosine of an IEEE double-precision floating-
  3782.             point number
  3783. Library:        mathieeedoubtrans.library
  3784. Offset:         -$0036 (-54)
  3785. Modula-2 Module:    none
  3786. Syntax:         fnum1 = IEEEDPSincos(fnum2, fnum3)
  3787. C:            double IEEEDPSincos(double, d0uble *)
  3788. Machine Language:    d0/d1 = IEEEDPSincos(d0/d1, a0)
  3789. Modula-2:        not available
  3790. Arguments:        fnum2 = IEEE double-precision floating-point number
  3791.             fnum3 = pointer to an IEEE double-precision floating point num-
  3792.             ber to receive the cosine of fnum2
  3793. Result:         fnum1 = IEEE double-precision floating-point sine of fnum2 (co-
  3794.             sine is returned in fnum3)
  3795. -------------------------
  3796. IEEEDPSinh
  3797. Description:        obtains the hyperbolic sine of an IEEE double-precision floating-
  3798.             point number
  3799. Library:        mathieeedoubtrans.library
  3800. Offset:         -$003C (-60)
  3801. Modula-2 Module:    none
  3802. Syntax:         fnum1 = IEEEDPSinh(fnum2)
  3803. C:            double IEEEDPSinh(double, d0uble)
  3804. Machine Language:    d0/d1 = IEEEDPSinh(d0/d1)
  3805. Modula-2:        not available
  3806. Arguments:        fnum2 = IEEE double-precision floating-point number represent-
  3807.             ing an angle in radians
  3808. Result:         fnum1 = IEEE double-precision floating-point hyperbolic sine of
  3809.             fnum2
  3810. -------------------------
  3811. IEEEDPSqrt
  3812. Description:        obtains the square root of an IEEE double-precision floating-point
  3813.             number
  3814. Library:        mathieeedoubtrans.library
  3815. Offset:         -$0060 (-96)
  3816. Modula-2 Module:    none
  3817. Syntax:         fnum1 = IEEEDPSqrt(fnum2)
  3818. C:            double IEEEDPSqrt(double)
  3819. Machine Language:    d0/d1 = IEEEDPSqrt(d0/d1)
  3820. Modula-2:        not available
  3821. Arguments:        fnum2 = IEEE double-precision floating-point number
  3822. Result:         fnum1 = IEEE double-precision floating-point square root of
  3823.             fnum2
  3824. -------------------------
  3825. IEEEDPSub
  3826. Description:        subtracts one IEEE double-precision floating-point number from
  3827.             another
  3828. Library:        mathieeedoubbas.library
  3829. Offset:         -$0048 (-72)
  3830. Modula-2 Module:    none
  3831. Syntax:         fnum1 = IEEEDPSub(fnum2, fnum3)
  3832. C:            double IEEEDPSub(double, d0uble)
  3833. Machine Language:    d0/d1 = IEEEDPSub(d0/d1, d2/d3)
  3834. Modula-2:        not available
  3835. Arguments:        fnum2 = IEEE double-precision floating-point number
  3836.             fnum3 = IEEE double-precision floating-point number
  3837. Result:         fnum1 = fnum2 minus fnum3 in IEEE double-precision floating-
  3838.             point format
  3839. -------------------------
  3840. IEEEDPTan
  3841. Description:        obtains the tangent of an IEEE double-precision floating-point
  3842.             number
  3843. Library:        mathieeedoubtrans.library
  3844. Offset:         -$0030 (-48)
  3845. Modula-2 Module:    none
  3846. Syntax:         fnum1 = IEEEDPTan(fnum2)
  3847. C:            double IEEEDPTan(double, d0uble)
  3848. Machine Language:    d0/d1 = IEEEDPTan(d0/d1)
  3849. Modula-2:        not available
  3850. Arguments:        fnum2 = IEEE double-precision floating-point number represent-
  3851.             ing an angle in radians
  3852. Result:         fnum1 = IEEE double-precision floating-point tangent of fnum2
  3853. -------------------------
  3854. IEEEDPTanh
  3855. Description:        obtains the hyperbolic tangent of an IEEE double-precision
  3856.             floating-point number
  3857. Library:        mathieeedoubtrans.library
  3858. Offset:         -$0048 (-72)
  3859. Modula-2 Module:    none
  3860. Syntax:         fnum1 = IEEEDPTanh(fnum2)
  3861. C:            double IEEEDPTanh(double, d0uble)
  3862. Machine Language:    d0/d1 = IEEEDPTanh(d0/d1)
  3863. Modula-2:        not available
  3864. Arguments:        fnum2 = IEEE double-precision floating-point number represent-
  3865.             ing an angle in radians
  3866. Result:         fnum1 = IEEE double-precision floating-point hyperbolic tangent
  3867.             of fnum2
  3868. -------------------------
  3869. IEEEDPTIeee
  3870. Description:        converts an IEEE double-precision floating-point number to an
  3871.             IEEE single-precision floating-point number
  3872. Library:        mathieeedoubtrans.library
  3873. Offset:         -$0066 (-102)
  3874. Modula-2 Module:    none
  3875. Syntax:         fnum1 = IEEEDPTieee(fnum2)
  3876. C:            float IEEEDPTieee(double)
  3877. Machine Language:    d0 = IEEEDPTieee(d0/d1)
  3878. Modula-2:        not available
  3879. Arguments:        fnum2 = IEEE double-precision floating-point number
  3880. Result:         fnum1 = IEEE single-precision floating-point equivalent to fnum2
  3881. -------------------------
  3882. IEEEDPTst
  3883. Description:        compares an IEEE double-precision floating-point number with
  3884.             zero
  3885. Library:        mathieeedoubbas.library
  3886. Offset:         -$0030 (-48)
  3887. Modula-2 Module:    none
  3888. Syntax:         flag = IEEEDPTst(fnum)
  3889. C:            long IEEEDPTst(double)
  3890. Machine Language:    d0 = IEEEDPTst(d0/d1)
  3891. Modula-2:        not available
  3892. Arguments:        fnum = IEEE double-precision floating-point number
  3893. Result:         flag = -1 if fnum <0; +1 if fnum >0; 0 if fnum=0
  3894. -------------------------
  3895. IncrCLMark
  3896. Description:        increments character list mark to the next position
  3897. Library:        clist.library
  3898. Offset:         -$007E (-126)
  3899. Modula-2 Module:    none
  3900. Syntax:         error = IncrCLMark(cList)
  3901. C:            long IncrCLMark(long)
  3902. Machine Language:    d0 = IncrCLMark(a0)
  3903. Modula-2:        not available
  3904. Arguments:        cList = character list descriptor
  3905. Result:         error = 0 if successful; nonzero if next offset is not in the charac-
  3906.             ter list
  3907. -------------------------
  3908. Info
  3909. Description:        returns information about a disk or disk file
  3910. Library:        dos.library
  3911. Offset:         -$0072 (-114)
  3912. Modula-2 Module:    DOS
  3913. Syntax:         success = Info(lock, infoData)
  3914. C:            long Info(BPTR, struct InfoData *)
  3915. Machine Language:    d0 = Info(d1, d2)
  3916. Modula-2:        Info(lock: FileLock; infoData: InfoDataPtr): BOOLEAN
  3917. Arguments:        lock = BCPL pointer to a lock
  3918.             infoData = InfoData structure to be filled
  3919. Result:         success = TRUE if successful; FALSE if unsuccessful
  3920. -------------------------
  3921. InitArea
  3922. Description:        initializes vector collection matrix
  3923. Library:        graphics.library
  3924. Offset:         -$011A (-282)
  3925. Modula-2 Module:    Areas
  3926. Syntax:         InitArea(areaInfo, buffer, maxVectors)
  3927. C:            long InitArea(struct AreaInfo *, short *, long)
  3928. Machine Language:    InitArea(a0, a1, d0)
  3929. Modula-2:        InitArea(areaInfo: AreaInfoPtr; buffer: ADDRESS; maxVectors:
  3930.             INTEGER)
  3931. Arguments:        areaInfo = AreaInfo structure
  3932.             buffer = pointer to memory block where vectors will be stored-
  3933.             must start on word boundary and should be 5*maxVectors bytes
  3934.             long
  3935.             maxVectors = maximum number of vectors
  3936. Result:         none
  3937. -------------------------
  3938. InitBitMap
  3939. Description:        initializes a BitMap structure
  3940. Library:        graphics.library
  3941. Offset:         -$0186 (-390)
  3942. Modula-2 Module:    Graphics
  3943. Syntax:         InitBitMap(bitMap, depth, width, height)
  3944. C:            void InitBitMap(struct Bitmap *, long, long, long)
  3945. Machine Language:    InitBitMap(a0, d0, d1, d2)
  3946. Modula-2:        InitBitMap(bitMap: BitMapPtr; depth, width, height: INTEGER)
  3947. Arguments:        bitMap = BitMap structure
  3948.             depth = number of bit planes to be used
  3949.             width = width of each bit plane in bits
  3950.             height = height of each bit plane in lines
  3951. Result:         none
  3952. -------------------------
  3953. InitCLPool
  3954. Description:        initializes a character list pool
  3955. Library:        clist.library
  3956. Offset:         -$001E (-30)
  3957. Modula-2 Module:    none
  3958. Syntax:         error = InitCLPool(cLPool, size)
  3959. C:            long InitCLPool(long, long)
  3960. Machine Language:    d0 = InitCLPool(a0, d0)
  3961. Modula-2:        not available
  3962. Arguments:        cLPool = data area to be used as character list pool
  3963.             size = size of pool in bytes
  3964. Result:         error = 0 if successful; nonzero if pool size is too small
  3965. -------------------------
  3966. InitCode
  3967. Description:        initializes resident modules with a startup class value and version
  3968.             number
  3969. Library:        exec.library
  3970. Offset:         -$0048 (-72)
  3971. Modula-2 Module:    Resident
  3972. Syntax:         InitCode(startClass, version)
  3973. C:            void InitCode(long, long)
  3974. Machine Language:    InitCode(d0, d1)
  3975. Modula-2:        InitCode(startClass, version: LONGCARD)
  3976. Arguments:        startClass = startup class of resident module-COLDSTART,
  3977.             COOLSTART, or WARMSTART
  3978.             version = version number of resident module
  3979. Result:         none
  3980. -------------------------
  3981. InitGels
  3982. Description:        initializes a GEL list
  3983. Library:        graphics.library
  3984. Offset:         -$0078 (-120)
  3985. Modula-2 Module:    Gels
  3986. Syntax:         InitGels(head, tail, gelsInfo)
  3987. C:            void InitGels(struct VSprite *, struct VSprite *, struct GelsInfo *)
  3988. Machine Language:    InitGels(a0, a1, a2)
  3989. Modula-2:        InitGels(head, tail: VSpritePtr; gelsInfo: GelsInfoPtr)
  3990. Arguments:        head = VSprite structure to be used as head of GEL list
  3991.             tail = VSprite structure to be used as tail of GEL list
  3992.             gelsInfo = GelsInfo structure to be initialized
  3993. Result:         none
  3994. -------------------------
  3995. InitGMasks
  3996. Description:        initializes all masks of an AnimOb structure
  3997. Library:        graphics.library
  3998. Offset:         -$00AE (-174)
  3999. Modula-2 Module:    Gels
  4000. Syntax:         InitGMasks(animOb)
  4001. C:            void InitGMasks(struct AnimOb *)
  4002. Machine Language:    InitGMasks(a0)
  4003. Modula-2:        InitGMasks(animOb: AnimObPtr)
  4004. Arguments:        animOb = AnimOb structure containing masks to initialize
  4005. Result:         none
  4006. -------------------------
  4007. InitLayers
  4008. Description:        initializes a Layer_Info structure
  4009. Library:        layers.library
  4010. Offset:         -$001E (-30)
  4011. Modula-2 Module:    none
  4012. Syntax:         InitLayers(layerInfo)
  4013. C:            void InitLayers(struct Layer_Info *)
  4014. Machine Language:    InitLayers(a0)
  4015. Modula-2:        not available
  4016. Arguments:        layerInfo = Layer_Info structure to initialize
  4017. Result:         none
  4018. -------------------------
  4019. InitMasks
  4020. Description:        initializes the BorderLine and CollMask values used by a VSprite
  4021.             structure
  4022. Library:        graphics.library
  4023. Offset:         -$007E (-126)
  4024. Modula-2 Module:    Gels
  4025. Syntax:         InitMasks(vSprite)
  4026. C:            void InitMasks(struct VSprite *)
  4027. Machine Language:    InitMasks(a0)
  4028. Modula-2:        InitMasks(vSprite: VSpritePtr)
  4029. Arguments:        vSprite = VSprite structure containing BorderLine and CollMask
  4030.             values to initialize
  4031. Result:         none
  4032. -------------------------
  4033. InitRastPort
  4034. Description:        initializes a RastPort structure
  4035. Library:        graphics.library
  4036. Offset:         -$00C6 (-198)
  4037. Modula-2 Module:    Rasters
  4038. Syntax:         InitRastPort(rastPort)
  4039. C:            void InitRastPort(struct RastPort *)
  4040. Machine Language:    InitRastPort(a1)
  4041. Modula-2:        InitRastPort(rastPort: RastPortPtr)
  4042. Arguments:        rastPort = RastPort structure to initialize
  4043. Result:         none
  4044. -------------------------
  4045. InitRequester
  4046. Description:        initializes a Requester structure
  4047. Library:        intuition.library
  4048. Offset:         -$008A (-138)
  4049. Modula-2 Module:    Intuition
  4050. Syntax:         InitRequester(requester)
  4051. C:            void InitRequester(struct Requester *)
  4052. Machine Language:    InitRequester(a0)
  4053. Modula-2:        InitRequester(requester: RequesterPtr)
  4054. Arguments:        requester = Requester structure to initialize
  4055. Result:         none
  4056. -------------------------
  4057. InitResident
  4058. Description:        initializes a resident module
  4059. Library:        exec.library
  4060. Offset:         -$0066 (-102)
  4061. Modula-2 Module:    Resident
  4062. Syntax:         InitResident(resident, segList)
  4063. C:            void InitResident(struct Resident *, char *)
  4064.  
  4065. Machine Language:    InitResident(a1, d1)
  4066. Modula-2:        InitResident(resident: ResidentPtr; segList: ADDRESS)
  4067. Arguments:        resident = Resident structure representing resident module to
  4068.             initialize
  4069.             segList = a segment list
  4070. Result:         none
  4071. -------------------------
  4072. InitSemaphore
  4073. Description:        initializes a SignalSemaphore structure
  4074. Library:        exec.library
  4075. Offset:         -$022E (-558)
  4076. Modula-2 Module:    Semaphores
  4077. Syntax:         InitSemaphore(signalSemaphore)
  4078. C:            void InitSemaphore(struct SignalSemaphore *)
  4079. Machine Language:    InitSemaphore(a0)
  4080. Modula-2:        InitSemaphore(signalSemaphore: SignalSemaphorePtr)
  4081. Arguments:        signalSemaphore = SignalSemaphore structure to initialize
  4082. Result:         none
  4083. -------------------------
  4084. InitStruct
  4085. Description:        clears an area of memory following rules defined by a table
  4086. Library:        exec.library
  4087. Offset:         -$004E (-78)
  4088. Modula-2 Module:    Memory
  4089. Syntax:         InitStruct(initTable, memBlock, size)
  4090. C:            void InitStruct(char *, char *, long)
  4091. Machine Language:    InitStruct(a1, a2, d0)
  4092. Modula-2:        InitStruct(initTable, memBlock: ADDRESS; size: CARDINAL)
  4093. Arguments:        initTable = pointer to the commands and data used to initialize
  4094.             memory
  4095.             memBlock = pointer to memory to be initialized
  4096.             size = size of memory to clear before it is initialized with
  4097.             initTable; 0 for no initial clearing of memory
  4098. Result:         none
  4099. -------------------------
  4100. InitTmpRas
  4101. Description:        initializes chip RAM for use by area-fill, flood-fill, and text
  4102.             functions
  4103. Library:        graphics.library
  4104. Offset:         -$01D4 (-468)
  4105. Modula-2 Module:    Rasters
  4106. Syntax:         InitTmpRas(tmpRas, buffer, size)
  4107. C:            void InitTmpRas(struct TmpRas *, char *, long)
  4108. Machine Language:    InitTmpRas(a0, a1, d0)
  4109. Modula-2:        InitTmpRas(tmpRas: TmpRasPtr; buffer: PlanePtr; size:
  4110.             LONGCARD)
  4111. Arguments:        tmpRas = TmpRas structure to be linked into a RastPort
  4112.             buffer = pointer to chip RAM memory
  4113.             size = size of buffer in bytes
  4114. Result:         none
  4115. -------------------------
  4116. InitView
  4117. Description:        initializes a View structure
  4118. Library:        graphics.library
  4119. Offset:         -$0168 (-360)
  4120. Modula-2 Module:    Views
  4121. Syntax:         InitView(view)
  4122. C:            void InitView(struct View *)
  4123. Machine Language:    InitView(a1)
  4124. Modula-2:        InitView(view: ViewPtr)
  4125. Arguments:        view = View structure to initialize
  4126. Result:         none
  4127. -------------------------
  4128. InitVPort
  4129. Description:        initializes a ViewPort structure
  4130. Library:        graphics.library
  4131. Offset:         -$00CC (-204)
  4132. Modula-2 Module:    Views
  4133. Syntax:         InitVPort(viewPort)
  4134. C:            void InitVPort(struct ViewPort *)
  4135. Machine Language:    InitVPort(a0)
  4136. Modula-2:        InitVPort(viewPort: ViewPortPtr)
  4137. Arguments:        viewPort = ViewPort structure to initialize
  4138. Result:         none
  4139. -------------------------
  4140. Input
  4141. Description:        gets the initial input file handle assigned to a program
  4142. Library:        dos.library
  4143. Offset:         -$0036 (-54)
  4144. Modula-2 Module:    DOS
  4145. Syntax:         file = Input( )
  4146. C:            BPTR Input(void)
  4147. Machine Language:    d0 = Input( )
  4148. Modula-2:        Input( ): FileHandle
  4149. Arguments:        none
  4150. Result:         file = BCPL pointer to a file handle
  4151. -------------------------
  4152. Insert
  4153. Description:        inserts a Node structure into a doubly-linked list
  4154. Library:        exec.library
  4155. Offset:         -$00EA (-234)
  4156. Modula-2 Module:    Lists
  4157. Syntax:         Insert(list, node, listNode)
  4158. C:            void Insert(struct List *, struct Node *, struct Node *)
  4159. Machine Language:    Insert(a0, a1, a2)
  4160. Modula-2:        Insert(list: ListPtr; node, listNode: NodePtr)
  4161. Arguments:        list = target List header
  4162.             node = Node structure to insert
  4163.             listNode = node after which to insert; NULL to insert at head
  4164. Result:         none
  4165. -------------------------
  4166. InstallClipRegion
  4167. Description:        installs a clip region into a layer
  4168. Library:        layers.library
  4169. Offset:         -$00AE (-174)
  4170. Modula-2 Module:    Layers
  4171. Syntax:         oldClipRegion = InstallClipRegion(layer, region)
  4172. C:            struct Region *InstallClipRegion(struct Layer *, struct Region *)
  4173. Machine Language:    d0 = InstallClipRegion(a0, a1)
  4174. Modula-2:        InstallClipRegion(layer: LayerPtr; region: RegionPtr): RegionPtr
  4175. Arguments:        layer = Layer structure to which region will be added
  4176.             region = Region structure to be added to layer
  4177. Result:         oldClipRegion = previous clip region that was installed; NULL if
  4178.             no previous clip region
  4179. -------------------------
  4180. IntuiTextLength
  4181. Description:        returns the pixel width of an IntuiText string
  4182. Library:        intuition.library
  4183. Offset:         -$014A (-330)
  4184. Modula-2 Module:    Intuition
  4185. Syntax:         length = IntuiTextLength(intuiText)
  4186. C:            long IntuiTextLength(struct IntuiText *)
  4187. Machine Language:    d0 = IntuiTextLength(a0)
  4188. Modula-2:        IntuiTextLength(intuiText: IntuiTextPtr): CARDINAL
  4189. Arguments:        intuiText = IntuiText structure
  4190. Result:         length = pixel width of text
  4191. -------------------------
  4192. Intuition
  4193. Description:        sets Intuition's main entry point, where input events arrive and
  4194.             are dispatched
  4195. Library:        intuition.library
  4196. Offset:         -$0024 (-36)
  4197. Modula-2 Module:    Intuition
  4198. Syntax:         Intuition(inputEvent)
  4199. C:            void Intuition(struct InputEvent *)
  4200. Machine Language:    Intuition(a0)
  4201. Modula-2:        Intuition(inputEvent: InputEventPtr)
  4202. Arguments:        inputEvent = first input event in a linked list of InputEvent
  4203.             structures
  4204. Result:         none
  4205. -------------------------
  4206. IoErr
  4207. Description:        gets extra information from the system
  4208. Library:        dos.library
  4209. Offset:         -$0084 (-132)
  4210. Modula-2 Module:    DOS
  4211. Syntax:         error = IoErr( )
  4212. C:            long IoErr(void)
  4213. Machine Language:    d0 = IoErr( )
  4214. Modula-2:        IoErr( ): LONGINT
  4215. Arguments:        none
  4216. Result:         error = error code or other error information
  4217. -------------------------
  4218. IsInteractive
  4219. Description:        finds out whether a file is connected to a virtual terminal
  4220. Library:        dos.library
  4221. Offset:         -$00D8 (-216)
  4222. Modula-2 Module:    DOS
  4223. Syntax:         status = IsInteractive(file)
  4224. C:            long IsInteractive(BPTR)
  4225. Machine Language:    d0 = IsInteractive(d1)
  4226. Modula-2:        IsInteractive(file: FileHandle): BOOLEAN
  4227. Arguments:        file = BCPL pointer to a file handle
  4228. Result:         status = TRUE if file is connected to a virtual terminal; FALSE if
  4229.             not
  4230. -------------------------
  4231. ItemAddress
  4232. Description:        returns address of specified MenuItem
  4233. Library:        intuition.library
  4234. Offset:         -$0090 (-144)
  4235. Modula-2 Module:    Intuition
  4236. Syntax:         address = ItemAddress(menuStrip, menuNumber)
  4237. C:            struct MenuItem *ItemAddress(struct Menu *, long)
  4238. Machine Language:    d0 = ItemAddress(a0, d0)
  4239. Modula-2:        ItemAddress(menuStrip: MenuPtr; menuNumber: CARDINAL):
  4240.             MenuItemPtr
  4241. Arguments:        menuStrip = first menu in your menu strip
  4242.             menuNumber = value with packed data that specifies the menu
  4243.             and item (and optionally subitem)
  4244. Result:         address = pointer to specified MenuItem; NULL if menuNumber
  4245.             equals NULL
  4246. -------------------------
  4247. ITEMNUM (macro)
  4248. Description:        extracts the menu item number from a value
  4249. C Include File:     include/intuition/intuition.h
  4250. ML Include File:    none
  4251. Modula-2 Module:    Intuition
  4252. Syntax:         itemNumber = ITEMNUM(menuValue)
  4253. C:            long ITEMNUM(long)
  4254. Machine Language:    not available
  4255. Modula-2:        ITEMNUM(menuValue: CARDINAL): CARDINAL
  4256. Arguments:        menuValue = 16-bit packed number representing the menu num-
  4257.             ber, item number, and subitem number
  4258. Result:         itemNumber = item number (0-63); equals NOITEM if no menu
  4259.             was selected
  4260. -------------------------
  4261. LoadRGB4
  4262. Description:        loads color register values from a data table
  4263. Library:        graphics.library
  4264. Offset:         -$00C0 (-192)
  4265. Modula-2 Module:    Views
  4266. Syntax:         LoadRGB4(viewPort, colormap, pens)
  4267. C:            void LoadRGB4(struct ViewPort *, short *, long)
  4268. Machine Language:    LoadRGB4(a0, a1, d0)
  4269. Modula-2:        LoadRGB4(viewPort: ViewPortPtr; colormap: ADDRESS; pens:
  4270.             INTEGER)
  4271. Arguments:        viewPort = ViewPort whose colors you want to change
  4272.             colormap = pointer to array of 16-bit color values, where the firs
  4273.             four bits are zero, the second contains red, the third green, and
  4274.             the fourth blue
  4275.             pens = number of consecutive color registers to load
  4276. Result:         none
  4277. -------------------------
  4278. LoadSeg
  4279. Description:        loads an AmigaDOS load module into memory
  4280. Library:        dos.library
  4281. Offset:         -$0096 (-150)
  4282. Modula-2 Module:    DOSLoader
  4283. Syntax:         segment = LoadSeg(name)
  4284. C:            BPTR LoadSeg(char *)
  4285. Machine Language:    d0 = LoadSeg(d1)
  4286. Modula-2:        LoadSeg(name: STRPTR): BPTR
  4287. Arguments:        name = NULL terminated string that specifies the filename of
  4288.             load module
  4289. Result:         segment = BCPL pointer to a segment; 0 if unsuccessful
  4290. -------------------------
  4291. LoadView
  4292. Description:        creates a display using a new copper list
  4293. Library:        graphics.library
  4294. Offset:         -$00DE (-222)
  4295. Modula-2 Module:    Views
  4296. Syntax:         LoadView(view)
  4297. C:            void LoadView(struct View *)
  4298. Machine Language:    LoadView(a1)
  4299. Modula-2:        LoadView(view: ViewPtr)
  4300. Arguments:        view = View structure with pointer to copper list
  4301. Result:         none
  4302. -------------------------
  4303. Lock
  4304. Description:        locks a directory or file
  4305. Library:        dos.library
  4306. Offset:         -$0054 (-84)
  4307. Modula-2 Module:    DOS
  4308. Syntax:         lock = Lock(name, accessMode)
  4309. C:            BPTR Lock(char *, long)
  4310. Machine Language:    d0 = Lock(d1, d2)
  4311. Modula-2:        Lock(name: STRPTR; accessMode: LONGINT): FileLock
  4312. Arguments:        name = NULL terminated string that specifies name of file or
  4313.             directory
  4314.             accessMode = type of lock-ACCESS_READ (shared) or
  4315.             ACCESS_WRITE (exclusive)
  4316. Result:         lock = BCPL pointer to a lock
  4317. -------------------------
  4318. LockIBase
  4319. Description:        locks IntuitionBase to keep other tasks (or the system) from
  4320.             changing it
  4321. Library:        intuition.library
  4322. Offset:         -$019E (-414)
  4323. Modula-2 Module:    IntuitionBase
  4324. Syntax:         lockValue = LockIBase(lockNumber)
  4325. C:            long LockIBase(long)
  4326. Machine Language:    d0 = LockIBase(d0)
  4327. Modula-2:        LockIBase(lockNumber: LONGCARD): LONGCARD
  4328. Arguments:        lockNumber = Intuition lock desired (should be zero)
  4329. Result:         lockValue = value to use to unlock IntuitionBase via
  4330.             UnlockIBase( )
  4331. -------------------------
  4332. LockLayer
  4333. Description:        locks a layer to protect it from graphics output
  4334. Library:        layers.library
  4335. Offset:         -$0060 (-96)
  4336. Modula-2 Module:    Layers
  4337. Syntax:         LockLayer(dummy, layer)
  4338. C:            void LockLayer(struct Layer_Info *, struct Layer *)
  4339. Machine Language:    LockLayer(a0, a1)
  4340. Modula-2:        LockLayer(layer: LayerPtr)
  4341. Arguments:        dummy = unused
  4342.             layer = Layer structure
  4343. Result:         none
  4344. -------------------------
  4345. LockLayerInfo
  4346. Description:        locks a Layer_Info structure to keep other tasks from changing it
  4347. Library:        layers.library
  4348. Offset:         -$0078 (-120)
  4349. Modula-2 Module:    Layers
  4350. Syntax:         LockLayerInfo(layerInfo)
  4351. C:            void LockLayerInfo(struct Layer_Info *)
  4352. Machine Language:    LockLayerInfo(a0, a1)
  4353. Modula-2:        LockLayerInfo(layerInfo: LayerInfoPtr)
  4354. Arguments:        layerInfo = Layerlnfo structure to lock
  4355. Result:         none
  4356. -------------------------
  4357. LockLayerRom
  4358. Description:        locks a Layer structure to keep other tasks from changing it
  4359. Library:        layers.library
  4360. Offset:         -$01B0 (-432)
  4361. Modula-2 Module:    Clip
  4362. Syntax:         LockLayerRom(layer)
  4363. C:            void LockLayerRom(struct Layer *)
  4364. Machine Language:    LockLayerRom(a5)
  4365. Modula-2:        LockLayerRom(layer: LayerPtr)
  4366. Arguments:        layer = Layer structure to lock
  4367. Result:         none
  4368. -------------------------
  4369. LockLayers
  4370. Description:        stops graphic output to all layers in a Layer_Info structure
  4371. Library:        layers.library
  4372. Offset:         -$006C (-108)
  4373. Modula-2 Module:    Layers
  4374. Syntax:         LockLayers(layerInfo)
  4375. C:            void LockLayers(struct Layer_Info *)
  4376. Machine Language:    LockLayers(a0)
  4377. Modula-2:        LockLayers(layerInfo: LayerInfoPtr)
  4378. Arguments:        layerlnfo = Layerlnfo structure with list of layers to lock
  4379. Result:         none
  4380. -------------------------
  4381. MakeDosNode
  4382. Description:        initializes the DeviceNode structure required to enter a DOS disk
  4383.             device into the system
  4384. Library:        expansion.library
  4385. Offset:         -$0090 (-144)
  4386. Modula-2 Module:    Expansion
  4387. Syntax:         deviceNode = MakeDosNode(parameterPacket)
  4388. C:            struct DeviceNode *MakeDosNode(long *)
  4389. Machine Language:    d0 = MakeDosNode(a0)
  4390. Modula-2:        MakeDosNode(parameterPacket: ADDRESS): DeviceNodePtr
  4391. Arguments:        parameterPacket = array of long words containing the DOS han-
  4392.             dler name, exec device name, unit number (for OpenDevice( )),
  4393.             flags (for OpenDevice( )), number of long words used to describe
  4394.             the handler environment, and the file handler environment, in
  4395.             that order.
  4396. Result:         deviceNode = pointer to initialized DeviceNode structure; NULL
  4397.             if not enough memory
  4398. -------------------------
  4399. MakeFunctions
  4400. Description:        constructs a jump table of the type used by resources, libraries,
  4401.             and devices
  4402. Library:        exec.library
  4403. Offset:         -$005A (-90)
  4404. Modula-2 Module:    Libraries
  4405. Syntax:         size = MakeFunctions(destination, funcArray, funcDispBase)
  4406. C:            void MakeFunctions(char *, long *, long)
  4407. Machine Language:    d0 = MakeFunctions(a0, a1, a2)
  4408. Modula-2:        MakeFunctions(destination, funcArray, funcDispBase: ADDRESS):
  4409.             LONGCARD
  4410. Arguments:        destination = target address for function jump table
  4411.             funcArray = pointer to array of function pointers or
  4412.             displacements
  4413.             funcDispBase = pointer to base about which all function displace-
  4414.             ments are relative; 0 if functionArray contains absolute pointers
  4415. Result:         size = size of new table in bytes (Modula-2 only)
  4416. -------------------------
  4417. MakeLibrary
  4418. Description:        constructs a library vector and data area
  4419. Library:        exec.library
  4420. Offset:         -$0054 (-84)
  4421. Modula-2 Module:    Libraries
  4422. Syntax:         library = MakeLibrary(vectors, structure, init, dataSize, segList)
  4423. C:            struct Library *MakeLibrary(long *, char *, _fptr, long, char *)
  4424. Machine Language:    d0 = MakeLibrary(a0, a1, a2, d0, d1)
  4425. Modula-2:        MakeLibrary(vectors, structure: ADDRESS; init: MAKELIBPROC;
  4426.             dataSize: LONGCARD; segList: ADDRESS): LibraryPtr
  4427. Arguments:        vectors = pointer to an array of function displacements-if first
  4428.             word is -1 array contains relative word displacements; otherwise
  4429.             array contains absolute function pointers
  4430.             structure = pointer to an InitStruct data region; can be NULL
  4431.             init = entry point that will be called before adding the library;
  4432.             can be NULL
  4433.             dataSize = size of library data area, including the standard library
  4434.             node data
  4435.             segList = pointer to a memory segment list (used by DOS)
  4436. Result:         library = reference address of library
  4437. -------------------------
  4438. MakeScreen
  4439. Description:        executes an Intuition-integrated MakeVPort( ) of a custom screen
  4440. Library:        intuition.library
  4441. Offset:         -$017A (-378)
  4442. Modula-2 Module:    Intuition
  4443. Syntax:         MakeScreen(screen)
  4444. C:            void MakeScreen(struct Screen *)
  4445. Machine Language:    MakeScreen(a0)
  4446. Modula-2:        MakeScreen(screen: ScreenPtr)
  4447. Arguments:        screen = custom screen
  4448. Result:         none
  4449. -------------------------
  4450. MakeVPort
  4451. Description:        constructs intermediate copper list for a ViewPort
  4452. Library:        graphics.library
  4453. Offset:         -$00D8 (-216)
  4454. Modula-2 Module:    Views
  4455. Syntax:         MakeVPort(view, viewPort)
  4456. C:            void MakeVPort(struct View *, struct ViewPort *)
  4457. Machine Language:    MakeVPort(a0, a1)
  4458. Modula-2:        MakeVPort(view: ViewPtr; viewPort: ViewPortPtr)
  4459. Arguments:        view = View structure
  4460.             viewPort = ViewPort structure
  4461. Result:         none
  4462. -------------------------
  4463. MarkCList
  4464. Description:        marks a position in a character list
  4465. Library:        clist.library
  4466. Offset:         -$0078 (-120)
  4467. Modula-2 Module:    none
  4468. Syntax:         error = MarkCList(cList, offset)
  4469. C:            long MarkCList(long, long)
  4470. Machine Language:    d0 = MarkCList(a0, a1)
  4471. Modula-2:        not available
  4472. Arguments:        cList = CList descriptor
  4473.             offset = byte offset into character list of position to mark
  4474. Result:         error = 0 if successful; nonzero if offset not in character list
  4475. -------------------------
  4476. MatchToolValue
  4477. Description:        checks a tool type variable for a particular value
  4478. Library:        icon.library
  4479. Offset:         -$0066 (-102)
  4480. Modula-2 Module:    Icon
  4481. Syntax:         result = MatchToolValue(typeString, value)
  4482. C:            long MatchToolValue(char *, char *)
  4483. Machine Language:    d0 = MatchToolValue(a0, a1)
  4484. Modula-2:        MatchToolValue(typeString, value: STRPTR): BOOLEAN
  4485. Arguments:        typeString = a ToolType value, as returned by FindToolType(
  4486.             value = value you are looking for
  4487. Result:         result = 0 if successful; nonzero if unsuccessful
  4488. -------------------------
  4489. MENUNUM (macro)
  4490. Description:        extracts the menu number from a value
  4491. C Include File:     include/intuition/intuition.h
  4492. ML Include File:    none
  4493. Modula-2 Module:    Intuition
  4494. Syntax:         menuNumber = MENUNUM(menuValue)
  4495. C:            long MENUNUM(long)
  4496. Machine Language:    not available
  4497. Modula-2:        MENUNUM(menuValue: CARDINAL): CARDINAL
  4498. Arguments:        menuValue = 16-bit packed number representing the menu num-
  4499.             ber, item number, and subitem number
  4500. Result:         menuNumber = menu number (0-31); equals NOMENU if no
  4501.             menu was selected
  4502. -------------------------
  4503. ModifyIDCMP
  4504. Description:        modifies the state of a window's IDCMP
  4505. Library:        intuition.library
  4506. Offset:         -$0096 (-150)
  4507. Modula-2 Module:    Intuition
  4508. Syntax:         ModifyIDCMP(window, flags)
  4509. C:            void ModifyIDCMP(struct Window *, long)
  4510. Machine Language:    ModifyIDCMP(a0, d0)
  4511. Modula-2:        ModifyIDCMP(window: WindowPtr; flags: IDCMPFlagsSet)
  4512. Arguments:        window = window containing IDCMP
  4513.             flags = IDCMP flags
  4514. Result:         none
  4515. -------------------------
  4516. ModifyProp
  4517. Description:        modifies current state of proportional gadgets (see
  4518.             NewModifyProp)
  4519. Library:        intuition.library
  4520. Offset:         -$009C (-156)
  4521. Modula-2 Module:    Intuition
  4522. Syntax:         ModifyProp(propGadget, window, requester, flags, horizPot,
  4523.             vertPot, horizBody, vertBody)
  4524. C:            void ModifyProp(struct Gadget *, struct Window *, struct Request-
  4525.             er *, long, long, long, long, long)
  4526. Machine Language:    ModifyProp(a0, a1, a2, d0, d1, d2, d3, d4)
  4527. Modula-2:        ModifyProp(propGadget: GadgetPtr; window: WindowPtr; re-
  4528.             quester: RequesterPtr; flags: PropFlagSet; horizPot, vertPot,
  4529.             horizBody, vertBody: CARDINAL)
  4530. Arguments:        propGadget = proportional gadget to modify
  4531.             window = window containing proportional gadget
  4532.             requester = Requester structure; NULL if gadget is not part of a
  4533.             requester
  4534.             flags = new flags value
  4535.             horizPot = new horizontal pot value (position)
  4536.             vertPot = new vertical pot value (position)
  4537.             horizBody = new horizontal body value (size of slider)
  4538.             vertBody = new vertical body value (size of slider)
  4539. Result:         none
  4540. -------------------------
  4541. Move
  4542. Description:        moves the drawing pen to the specified position without drawing
  4543.             anything
  4544. Library:        layers.library
  4545. Offset:         -$00F0 (-240)
  4546. Modula-2 Module:    Drawing
  4547. Syntax:         Move(rastPort, x, y)
  4548. C:            void Move(struct RastPort *, long, long)
  4549. Machine Language:    Move(a0, d0, d1)
  4550. Modula-2:        Move(rastPort: RastPortPtr; x, y: INTEGER)
  4551. Arguments:        rastPort = RastPort structure
  4552.             x = new horizontal coordinate
  4553.             y = new vertical coordinate
  4554. Result:         none
  4555. -------------------------
  4556. MoveLayer
  4557. Description:        moves a nonbackdrop layer to a new position in the bitmap
  4558. Library:        layers.library
  4559. Offset:         -$003C (-60)
  4560. Modula-2 Module:    Layers
  4561. Syntax:         success = MoveLayer(dummy, layer, dx, dy)
  4562. C:            long MoveLayer(struct Layerlnfo *, struct Layer *, long, long)
  4563. Machine Language:    d0 = MoveLayer(a0, a1, d0, d1)
  4564. Modula-2:        MoveLayer(layer: LayerPtr; dx, dy: LONGINT): BOOLEAN
  4565. Arguments:        dummy = unused
  4566.             layer = nonbackdrop Layer structure
  4567.             dx = offset by which to move layer horizontally
  4568.             dy = offset by which to move layer vertically
  4569. Result:         success = TRUE is successful; FALSE if unsuccessful
  4570. -------------------------
  4571. MoveLayerInFrontOf
  4572. Description:        moves a layer in front of another layer
  4573. Library:        layers.library
  4574. Offset:         -$00A8 (-168)
  4575. Modula-2 Module:    Layers
  4576. Syntax:         success = MoveLayerInFrontOf(layer, target)
  4577. C:            long MoveLayerInFrontOf(struct Layer *, struct Layer *)
  4578. Machine Language:    d0 = MoveLayerInFrontOf(d0, a1)
  4579. Modula-2:        MoveLayerInFrontOf(layer, target: LayerPtr): BOOLEAN
  4580. Arguments:        layer = layer to move
  4581.             target = layer to have another layer placed on top of
  4582. Result:         success = TRUE if successful; FALSE if unsuccessful
  4583. -------------------------
  4584. MoveScreen
  4585. Description:        moves a screen vertically
  4586. Library:        intuition.library
  4587. Offset:         -$00A2 (-162)
  4588. Modula-2 Module:    Intuition
  4589. Syntax:         MoveScreen(screen, dx, dy)
  4590. C:            void MoveScreen(struct Screen *, long, long)
  4591. Machine Language:    MoveScreen(a0, d0, a1)
  4592. Modula-2:        MoveScreen(screen: ScreenPtr; dx, dy: INTEGER)
  4593. Arguments:        screen = screen to move
  4594.             dx = offset by which to move screen horizontally
  4595.             dy = offset by which to move screen vertically (not implemented
  4596.             as of system version 1.3)
  4597. Result:         none
  4598. -------------------------
  4599. MoveSprite
  4600. Description:        moves a sprite to specified location
  4601. Library:        graphics.library
  4602. Offset:         -$01AA (-426)
  4603. Modula-2 Module:    Sprites
  4604. Syntax:         MoveSprite(viewPort, sprite, x, y)
  4605. C:            long MoveSprite(struct ViewPort *, struct SimpleSprite *, long,
  4606.             long)
  4607. Machine Language:    MoveSprite(a0, a1, d0, d1)
  4608. Modula-2:        MoveSprite(viewPort: ViewPortPtr; sprite: SimpleSpritePtr; x, y:
  4609.             INTEGER)
  4610. Arguments:        viewPort = ViewPort structure
  4611.             sprite = SimpleSprite structure
  4612.             x = new horizontal position of sprite
  4613.             y = new vertical position of sprite
  4614. Result:         none
  4615. -------------------------
  4616. MoveWindow
  4617. Description:        moves a window
  4618. Library:        intuition.library
  4619. Offset:         -$00A8 (-168)
  4620. Modula-2 Module:    Intuition
  4621. Syntax:         MoveWindow(window, dx, dy)
  4622. C:            void MoveWindow(struct Window *, long, long)
  4623. Machine Language:    MoveWindow(a0, d0, a1)
  4624. Modula-2:        MoveWindow(window: WindowPtr; dx, dy: INTEGER)
  4625. Arguments:        window = window to move
  4626.             dx = offset by which to move window horizontally
  4627.             dy = offset by which to move window vertically
  4628. Result:         none
  4629. -------------------------
  4630. MrgCop
  4631. Description:        merges coprocessor instructions to form one instruction list
  4632. Library:        graphics.library
  4633. Offset:         -$00D2 (-210)
  4634. Modula-2 Module:    Views
  4635. Syntax:         MrgCop(view)
  4636. C:            void MrgCop(struct View *)
  4637. Machine Language:    MrgCop(a1)
  4638. Modula-2:        MrgCop(view: ViewPtr)
  4639. Arguments:        view = View structure
  4640. Result:         none
  4641. -------------------------
  4642. NewFontContents
  4643. Description:        creates an array of FontContents entries describing all fonts asso-
  4644.             ciated with specified font name
  4645. Library:        diskfont.library
  4646. Offset:         -$002A (-42)
  4647. Modula-2 Module:    none
  4648. Syntax:         fontContentsHeader = NewFontContents(fontsLock, fontName)
  4649. C:            struct FontContentsHeader *NewFontContents(BPTR, char *)
  4650. Machine Language:    d0 = NewFontContents(a0, a1)
  4651. Modula-2:        not available
  4652. Arguments:        fontsLock = BCPL pointer to a lock on the directory containing
  4653.             the fonts contents file (usually FONTS: directory)
  4654.             fontName = filename of font contents file (for example,
  4655.             "Diamond.font")
  4656. Result:         fontContentsHeader = pointer to a FontContentsHeader
  4657. -------------------------
  4658. NewLayerInfo
  4659. Description:        creates a Layer_Info structure
  4660. Library:        layers.library
  4661. Offset:         -$0090 (-144)
  4662. Modula-2 Module:    Layers
  4663. Syntax:         layerInfo = NewLayerInfo( )
  4664. C:            struct Layer_Info *NewLayerInfo(void)
  4665. Machine Language:    d0 = NewLayerInfo( )
  4666. Modula-2:        NewLayerInfo( ): LayerInfoPtr
  4667. Arguments:        none
  4668. Result:         layerInfo = pointer to initialized Layer_Info structure; NULL if
  4669.             unsuccessful
  4670. -------------------------
  4671. NewList
  4672. Description:        initializes a list header
  4673. Library:        amiga.lib (linked library)
  4674. ML Include File:    none
  4675. Modula-2 Module:    Lists
  4676. Syntax:         NewList(list)
  4677. C:            void NewList(struct List *)
  4678. Machine Language:    not available
  4679. Modula-2:        NewList(VAR list: List)
  4680. Arguments:        list = List structure
  4681. Result:         none
  4682. -------------------------
  4683. NewModifyProp
  4684. Description:        modifies current state of proportional gadgets, with selective gad-
  4685.             get refresh
  4686. Library:        intuition.library
  4687. Offset:         -$01D4 (-468)
  4688. Modula-2 Module:    Intuition
  4689. Syntax:         NewModifyProp(propGadget, window, requester, flags, horizPot,
  4690.             vertPot, horizBody, vertBody, gadgetNumber)
  4691. C:            void NewModifyProp(struct Gadget *, struct Window *, struct Re-
  4692.             quester *, long, long, long, long, long, long)
  4693. Machine Language:    NewModifyProp(a0, a1, a2, d0, d1, d2, d3, d4, d5)
  4694. Modula-2:        NewModifyProp(propGadget: GadgetPtr; window: WindowPtr; re-
  4695.             quester: RequesterPtr; flags: PropFlagSet; horizPot, vertPot,
  4696.             horizBody, vertBody: CARDINAL; gadgetNumber: INTEGER)
  4697. Arguments:        propGadget = proportional gadget to modify
  4698.             window = window containing proportional gadget
  4699.             requester = Requester structure; NULL if gadget is not part of a
  4700.             requester
  4701.             flags = new flags value
  4702.             horizPot = new horizontal pot value (position)
  4703.             vertPot = new vertical pot value (position)
  4704.             horizBody = new horizontal body value (size of slider)
  4705.             vertBody = new vertical body value (size of slider)
  4706.             gadgetNumber = number of gadgets to refresh after gadget modi-
  4707.             fication; -1 to refresh all gadgets to the end of gadget list
  4708. Result:         none
  4709. -------------------------
  4710. NewRegion
  4711. Description:        creates an empty Region structure
  4712. Library:        graphics.library
  4713. Offset:         -$0204 (-516)
  4714. Modula-2 Module:    Regions
  4715. Syntax:         region = NewRegion( )
  4716. C:            struct Region *NewRegion(void)
  4717. Modula-2:        NewRegion(VAR list: List)
  4718.             NewRegion( ): RegionPrt
  4719. Arguments:        none
  4720. Result:         region = pointer to initialized Region structure; NULL if not
  4721.             enough memory
  4722. -------------------------
  4723. ObtainConfigBinding
  4724. Description:        attempts to get permission to bind drivers
  4725. Library:        expansion.library
  4726. Offset:         -$0078 (-120)
  4727. Modula-2 Module:    none
  4728. Syntax:         ObtainConfigBinding( )
  4729. C:            void ObtainConfigBinding(void)
  4730. Machine Language:    ObtainConfigBinding( )
  4731. Modula-2:        not available
  4732. Arguments:        none
  4733. Result:         none
  4734. ------------------------
  4735. ObtainSemaphore
  4736. Description:        obtains exclusive use of a signal semaphore
  4737. Library:        exec.library
  4738. Offset:         -$0234 (-564)
  4739. Modula-2 Module:    Semaphores
  4740. Syntax:         ObtainSemaphore(signalSemaphore)
  4741. C:            void ObtainSemaphore(struct SignalSemaphore *)
  4742. Machine Language:    ObtainSemaphore(a0)
  4743. Modula-2:        ObtainSemaphore(signalSemaphore: SignalSemaphorePtr)
  4744. Arguments:        signalSemaphore = initialized SignalSemaphore structure
  4745. Result:         none
  4746. -------------------------
  4747. ObtainSemaphoreList
  4748. Description:        obtains exclusive use of a list of signal semaphores
  4749. Library:        exec.library
  4750. Offset:         -$0246 (-582)
  4751. Modula-2 Module:    Semaphores
  4752. Syntax:         ObtainSemaphoreList(list)
  4753. C:            void ObtainSemaphoreList(struct List *)
  4754. Machine Language:    ObtainSemaphoreList(a0)
  4755. Modula-2:        ObtainSemaphoreList(list: SignalSemaphorePtr)
  4756. Arguments:        list = List structure representing a list of signal semaphores
  4757. Result:         none
  4758. -------------------------
  4759. OFFDISPLAY (macro)
  4760. Description:        clears the display DMA bit in the DMA control register
  4761. C Include File:     include/graphics/gfxmacros.h
  4762. ML Include File:    none
  4763. Modula-2 Module:    CustomHardware
  4764. Syntax:         OFF_DISPLAY( )
  4765. C:            void OFF_DISPLAY(void)
  4766. Machine Language:    not available
  4767. Modula-2:        OFFDISPLAY( )
  4768. Arguments:        none
  4769. Result:         none
  4770. -------------------------
  4771. OffGadget
  4772. Description:        disables a gadget
  4773. Library:        intuition.library
  4774. Offset:         -$00AE (-174)
  4775. Modula-2 Module:    Intuition
  4776. Syntax:         OffGadget(gadget, window, requester)
  4777. C:            void OffGadget(struct Gadget , struct Window *, struct Requester *)
  4778. Machine Language:    OffGadget(a0, a1, a2)
  4779. Modula-2:        OffGadget(gadget: GadgetPtr; window: WindowPtr; requester:
  4780.             RequesterPtr)
  4781. Arguments:        gadget = gadget to disable
  4782.             window = window containing gadget
  4783.             requester = Requester structure; NULL if gadget is not part of a
  4784.             requester
  4785. Result:         none
  4786. -------------------------
  4787. OffMenu
  4788. Description:        disables a menu or menu item
  4789. Library:        intuition.library
  4790. Offset:         -$00B4 (-180)
  4791. Modula-2 Module:    Intuition
  4792. Syntax:         OffMenu(window, menuNumber)
  4793. C:            void OffMenu(struct Window *, long)
  4794. Machine Language:    OffMenu(a0, d0)
  4795. Modula-2:        OffMenu(window: WindowPtr; menuNumber: CARDINAL)
  4796. Arguments:        window = window containing menu or menu item
  4797.             menuNumber = number specifying menu or menu item to dis-
  4798.             able-bits 0-4 specify menu number, bits 5-10 specify menu
  4799.             item, and bits 11-15 specify menu subitems
  4800. Result:         none
  4801. -------------------------
  4802. OFF_SPRITE (macro)
  4803. Description:        clears the sprite DMA bit in the DMA control register
  4804. C Include File:     include/graphics/gfxmacros.h
  4805. ML Include File:    none
  4806. Modula-2 Module:    CustomHardware
  4807. Syntax:         OFF_SPRITE( )
  4808. C:            void OFF_SPRITE(void)
  4809. Machine Language:    not available
  4810. Modula-2:        OFFSPRITE( )
  4811. Arguments:        none
  4812. Result:         none
  4813. -------------------------
  4814. OFF_VBLANK (macro)
  4815. Description:        clears the vertical blanking interrupt (bit 5) in the interrupt control
  4816.             register
  4817. C Include File:     include/graphics/gfxmacros.h
  4818. ML Include File:    none
  4819. Modula-2 Module:    none
  4820. Syntax:         OFF_VBLANK( )
  4821. C:            void OFF_VBLANK(void)
  4822. Machine Language:    not available
  4823. Modula-2:        not available
  4824. Arguments:        none
  4825. Result:         none
  4826. -------------------------
  4827. OldOpenLibrary
  4828. Description:        obsolete version of the OpenLibrary( ) function which gains access
  4829.             to a library without requiring a version number; do not use this
  4830.             function-use OpenLibrary( ) instead
  4831. Library:        exec.library
  4832. Offset:         -$0198 (-408)
  4833. Modula-2 Module:    none
  4834. Syntax:         library = Old0penLibrary(name)
  4835. C:            struct Library *Old0penLibrary(char *)
  4836. Machine Language:    d0 = Old0penLibrary(a1)
  4837. Modula-2:        not available
  4838. Arguments:        name = name of desired library
  4839. Result:         library = base pointer to desired library; NULL if library cannot
  4840.             be found
  4841. -------------------------
  4842. ON_DISPLAY (macro)
  4843. Description:        sets the display DMA bit in the DMA control register
  4844. C Include File:     include/graphics/gfxmacros.h
  4845. ML Include File:    none
  4846. Modula-2 Module:    CustomHardware
  4847. Syntax:         ON_DISPLAY( )
  4848. C:            void ON_DISPLAY(void)
  4849. Machine Language:    not available
  4850. Modula-2:        ONDISPLAY( )
  4851. Arguments:        none
  4852. Result:         none
  4853. -------------------------
  4854. OnGadget
  4855. Description:        enables a gadget
  4856. Library:        intuition.library
  4857. Offset:         -$00BA (-186)
  4858. Modula-2 Module:    Intuition
  4859. Syntax:         OnGadget(gadget, window, requester)
  4860. C:            void OnGadget(struct Gadget *, struct Window *, struct Requester *)
  4861. Machine Language:    OnGadget(a0, a1, a2)
  4862. Modula-2:        OnGadget(gadget: GadgetPtr; window: WindowPtr; requester:
  4863.             RequesterPtr)
  4864. Arguments:        gadget = gadget to enable
  4865.             window = window containing gadget
  4866. requester = Requester structure; NULL if gadget is not part of a
  4867.             requester
  4868. Result:         none
  4869. -------------------------
  4870. OnMenu
  4871. Description:        enables a menu or menu item
  4872. Library:        intuition.library
  4873. Offset:         -$00C0 (-192)
  4874. Modula-2 Module:    Intuition
  4875. Syntax:         OnMenu(window, menuNumber)
  4876. C:            void OnMenu(struct Window *, long)
  4877. Machine Language:    OnMenu(a0, d0)
  4878. Modula-2:        OnMenu(window: WindowPtr; menuNumber: CARDINAL)
  4879. Arguments:        window = window containing menu or menu item
  4880.             menuNumber = number specifying menu or menu item to en-
  4881.             able-bits 0-4 specify menu number, bits 5-10 specify menu
  4882.             item, and bits 11-15 specify menu subitems
  4883. Result:         none
  4884. -------------------------
  4885. ON_SPRITE (macro)
  4886. Description:        sets the sprite DMA bit in the DMA control register
  4887. C Include File:     include/graphics/gfxmacros.h
  4888. ML Include File:    none
  4889. Modula-2 Module:    CustomHardware
  4890. Syntax:         ON_SPRITE( )
  4891. C:            void ON_SPRITE(void)
  4892. Machine Language:    ON_SPRITE( )
  4893. Modula-2:        ONSPRITE( )
  4894. Arguments:        none
  4895. Result:         none
  4896. -------------------------
  4897. ON_VBLANK (macro)
  4898. Description:        sets the vertical blanking interrupt (bit 5) in the interrupt control
  4899.             register
  4900. C Include File:     include/graphics/gfxmacros.h
  4901. ML Include File:    none
  4902. Modula-2 Module:    none
  4903. Syntax:         ON_VBLANK( )
  4904. C:            void ON_VBLANK(void)
  4905. Machine Language:    ON_VBLANK( )
  4906. Modula-2:        not available
  4907. Arguments:        none
  4908. Result:         none
  4909. -------------------------
  4910. Open
  4911. Description:        opens a file for input or output
  4912. Library:        dos.library
  4913. Offset:         -$001E (-30)
  4914. Modula-2 Module:    DOS
  4915. Syntax:         file = Open(name, accessMode)
  4916. C:            BPTR Open(char *, long)
  4917. Machine Language:    d0 = Open(d1, d2)
  4918. Modula-2:        Open(name: STRPTR; accessMode: LONGINT): FileHandle
  4919. Arguments:        name = NULL terminated string specifying filename
  4920.             accessMode = type of file access desired-MODE_OLDFILE for
  4921.             reading, MODE_NEWFILE for writing
  4922. Result:         file = BCPL pointer to file handle; NULL if unsuccessful
  4923. -------------------------
  4924. OpenDevice
  4925. Description:        provides access to a device and initializes an IO request block for
  4926.             access to the device
  4927. Library:        exec.library
  4928. Offset:         -$01BC (-444)
  4929. Modula-2 Module:    Devices
  4930. Syntax:         error = OpenDevice(name, unitNumber, ioRequest, flags)
  4931. C:            long OpenDevice(char *, long, struct IORequest *, long)
  4932. Machine Language:    d0 = OpenDevice(a0, d0, a1, d2)
  4933. Modula-2:        OpenDevice(name: STRPTR; unitNumber: LONGCARD;
  4934.             ioRequest: ADDRESS; flags: LONGBITSET): INTEGER
  4935. Arguments:        name = NULL terminated string specifying device name
  4936.             unitNumber = desired unit number for device (device specific)
  4937.             ioRequest = IORequest block to initialize
  4938.             flags = additional device information (device specific)
  4939. Result:         error = 0 if successful; nonzero if unsuccessful
  4940. -------------------------
  4941. OpenDiskFont
  4942. Description:        gains access to a disk-resident font
  4943. Library:        diskfont.library
  4944. Offset:         -$001E (-30)
  4945. Modula-2 Module:    DiskFont
  4946. Syntax:         font = OpenDiskFont(textAttr)
  4947. C:            struct TextFont *OpenDiskFont(struct TextAttr *)
  4948. Machine Language:    d0 = OpenDiskFont(a0)
  4949. Modula-2:        OpenDiskFont(textAttr: TextAttrPtr): TextFontPtr
  4950. Arguments:        textAttr = TextAttr structure that describes the desired font
  4951. Result:         font = pointer to desired TextFont structure; 0 if unsuccessful
  4952. -------------------------
  4953. OpenFont
  4954. Description:        gains access to a memory-resident font
  4955. Library:        graphics.library
  4956. Offset:         -$0048 (-72)
  4957. Modula-2 Module:    Text
  4958. Syntax:         font = OpenFont(textAttr)
  4959. C:            struct TextFont *OpenFont(struct TextAttr *)
  4960. Machine Language:    d0 = OpenFont(a0)
  4961. Modula-2:        OpenFont(textAttr: TextAttrPtr): TextFontPtr
  4962. Arguments:        textAttr = TextAttr structure that describes the desired font
  4963. Result:         font = pointer to desired TextFont structure; 0 if unsuccessful
  4964. -------------------------
  4965. OpenLibrary
  4966. Description:        gains access to a library
  4967. Library:        exec.library
  4968. Offset:         -$0228 (-552)
  4969. Modula-2 Module:    Libraries
  4970. Syntax:         library = OpenLibrary(name, version)
  4971. C:            struct Library *OpenLibrary(char *, long)
  4972. Machine Language:    d0 = OpenLibrary(a1, d0)
  4973. Modula-2:        OpenLibrary(name: STRPTR; version: LONGCARD): LibraryPtr
  4974. Arguments:        name = name of desired library
  4975.             version = lowest acceptable library version number; 0 if you
  4976.             don't care
  4977. Result:         library = base pointer to desired library; NULL if library cannot
  4978.             be found
  4979. -------------------------
  4980. OpenResource
  4981. Description:        gains access to a resource
  4982. Library:        exec.library
  4983. Offset:         -$01F2 (-498)
  4984. Modula-2 Module:    Resources
  4985. Syntax:         resource = OpenResource(name)
  4986. C:            struct Resource *OpenResource(char *)
  4987. Machine Language:    d0 = OpenResource(a1)
  4988. Modula-2:        OpenResource(name: STRPTR): ResourcePtr
  4989. Arguments:        name = name of desired resource
  4990. Result:         resource = pointer to resource; NULL if unsuccessful
  4991. -------------------------
  4992. OpenScreen
  4993. Description:        opens an Intuition screen
  4994. Library:        intuition.library
  4995. Offset:         -$00C6 (-198)
  4996. Modula-2 Module:    Intuition
  4997. Syntax:         screen = OpenScreen(newScreen)
  4998. C:            struct Screen *OpenScreen(struct NewScreen *)
  4999. Machine Language:    d0 = OpenScreen(a0)
  5000. Modula-2:        OpenScreen(newScreen: NewScreenPtr): ScreenPtr
  5001. Arguments:        newScreen = NewScreen structure that describes screen to open
  5002. Result:         screen = pointer to Screen structure; NULL if unsuccessful
  5003. -------------------------
  5004. OpenWindow
  5005. Description:        opens an Intuition window
  5006. Library:        intuition.library
  5007. Offset:         -$00CC (-204)
  5008. Modula-2 Module:    Intuition
  5009. Syntax:         window = OpenWindow(newWindow)
  5010. C:            struct Window *OpenWindow(struct NewWindow *)
  5011. Machine Language:    d0 = OpenWindow(a0)
  5012. Modula-2:        OpenWindow(newWindow: NewWindowPtr): WindowPtr
  5013. Arguments:        newWindow = NewWindow structure that describes window to
  5014.             open
  5015. Result:         window = pointer to Window structure; NULL if unsuccessful
  5016. -------------------------
  5017. OpenWorkBench
  5018. Description:        opens the Workbench screen
  5019. Library:        intuition.library
  5020. Offset:         -$00D2 (-210)
  5021. Modula-2 Module:    Intuition
  5022. Syntax:         success = OpenWorkBench( )
  5023. C:            long OpenWorkBench(void)
  5024. Machine Language:    d0 = OpenWorkBench( )
  5025. Modula-2:        OpenWorkBench( ): BOOLEAN
  5026. Arguments:        none
  5027. Result:         success = TRUE if successful (value represents pointer to Work-
  5028.             Bench screen-this may change in system versions greater than
  5029.             1.3); FALSE (NULL) if unsuccessful
  5030. -------------------------
  5031. OrRectRegion
  5032. Description:        performs a two-dimensional OR operation of a rectangle with a
  5033.             region, leaving the result in the region
  5034. Library:        graphics.library
  5035. Offset:         -$01FE (-510)
  5036. Modula-2 Module:    Regions
  5037. Syntax:         success = OrRectRegion(region, rectangle)
  5038. C:            long OrRectRegion(struct Region *, struct Rectangle *)
  5039. Machine Language:    d0 = OrRectRegion(a0, a1)
  5040. Modula-2:        OrRectRegion(region: RegionPtr; rectangle: RectanglePtr):
  5041.             BOOLEAN
  5042. Arguments:        region = Region structure
  5043.             rectangle = Rectangle structure
  5044. Result:         success = TRUE if successful; FALSE if unsuccessful
  5045. -------------------------
  5046. OrRegionRegion
  5047. Description:        performs a two-dimensional OR operation of one region with a
  5048.             second region, leaving the result in second region
  5049. Library:        graphics.library
  5050. Offset:         -$0264 (-612)
  5051. Modula-2 Module:    Regions
  5052. Syntax:         success = OrRegionRegion(region1, region2)
  5053. C:            long OrRegionRegion(struct Region *, struct Region *)
  5054. Machine Language:    d0 = OrRegionRegion(a0, a1)
  5055. Modula-2:        OrRegionRegion(region1, region2: RegionPtr): BOOLEAN
  5056. Arguments:        region1 = Region structure
  5057.             region2 = Region structure
  5058. Result:         success = TRUE if successful; FALSE if unsuccessful
  5059. -------------------------
  5060. Output
  5061. Description:        gets the initial output file handle assigned to a program
  5062. Library:        dos.library
  5063. Offset:         -$003C (-60)
  5064. Modula-2 Module:    DOS
  5065. Syntax:         file = Output( )
  5066. C:            BPTR Output(void)
  5067. Machine Language:    d0 = Output( )
  5068. Modula-2:        Output( ): FileHandle
  5069. Arguments:        none
  5070. Result:         file = BCPL pointer to a file handle
  5071. -------------------------
  5072. OwnBlitter
  5073. Description:        reserves the blitter for private use
  5074. Library:        graphics.library
  5075. Offset:         -$01C8 (-456)
  5076. Modula-2 Module:    Blitter
  5077. Syntax:         OwnBlitter( )
  5078. C:            void OwnBlitter(void)
  5079. Machine Language:    OwnBlitter( )
  5080. Modula-2:        OwnBlitter( )
  5081. Arguments:        none
  5082. Result:         none
  5083. -------------------------
  5084. ParentDir
  5085. Description:        obtains the parent directory of a file or directory
  5086. Library:        dos.library
  5087. Offset:         -$00D2 (-210)
  5088. Modula-2 Module:    DOS
  5089. Syntax:         lock = ParentDir(lock)
  5090. C:            BPTR ParentDir(BPTR)
  5091. Machine Language:    d0 = ParentDir(d1)
  5092. Modula-2:        ParentDir(lock: FileLock): FileLock
  5093. Arguments:        lock = BCPL pointer to lock associated with child file or directory
  5094. Result:         lock = BCPL pointer to lock associated with parent directory
  5095. -------------------------
  5096. PeekCLMark
  5097. Description:        gets byte located in mark position of a character list
  5098. Library:        clist.library
  5099. Offset:         -$0084 (-132)
  5100. Modula-2 Module:    none
  5101. Syntax:         byte = PeekCLMark(cList)
  5102. C:            long PeekCLMark(long)
  5103. Machine Language:    d0 = PeekCLMark(a0)
  5104. Modula-2:        not available
  5105. Arguments:        cList = character list descriptor
  5106. Result:         byte = byte located in mark position of character list
  5107. -------------------------
  5108. Permit
  5109. Description:        permits task rescheduling halted by Forbid( )
  5110. Library:        exec.library
  5111. Offset:         -$008A (-138)
  5112. Modula-2 Module:    Interrupts
  5113. Syntax:         Permit( )
  5114. C:            void Permit(void)
  5115. Machine Language:    Permit( )
  5116. Modula-2:        Permit( )
  5117. Arguments:        none
  5118. Result:         none
  5119. -------------------------
  5120. PolyDraw
  5121. Description:        draws a series of connected lines from current pen position to
  5122.             points specified by a table of (x,y) coordinates
  5123. Library:        graphics.library
  5124. Offset:         -$0150 (-336)
  5125. Modula-2 Module:    Pens
  5126. Syntax:         PolyDraw(rastPort, count, array)
  5127. C:            long PolyDraw(struct RastPort *, long, short *)
  5128. Machine Language:    PolyDraw(al, d0, a0)
  5129. Modula-2:        PolyDraw(rastPort: RastPortPtr; count: INTEGER; array:
  5130.             ADDRESS)
  5131. Arguments:        rastPort = RastPort to draw lines in
  5132.             count = number of coordinates in array
  5133.             array = pointer to array of coordinates
  5134. Result:         none
  5135. -------------------------
  5136. printf
  5137. Description:        prints a formatted string to the standard output (Lattice and Manx
  5138.             users: if you link with lc.lib or c.lib, this is not the function you're
  5139.             calling)
  5140. Library:        amiga.lib (linked library)
  5141. Modula-2 Module:    none
  5142. Syntax:         printf(string, values...)
  5143. C:            void printf(char *, long...)
  5144. Machine Language:    move.l #value,-(sp) ;may have several values
  5145.             pea string
  5146.             jsr _printf
  5147.             add.l #8,sp ;(2 arguments * 4 bytes = 8)
  5148. Modula-2:        not available
  5149. Arguments:        string = string containing optional C formatting commands (%); if
  5150.             you're passing longword values on the stack (as shown above) be
  5151.             sure to follow the percent symbol with a lowercase L
  5152.             values = values or addresses of strings to print; this routine
  5153.             knows how many values are on the stack by checking the number
  5154.             of formatting commands in the string argument
  5155. Result:         none
  5156. -------------------------
  5157. PrintIText
  5158. Description:        prints text according to its IntuiText specifications
  5159. Library:        intuition.library
  5160. Offset:         -$00D8 (-216)
  5161. Modula-2 Module:    Intuition
  5162. Syntax:         PrintIText(rastPort, intuiText, leftEdge, topEdge)
  5163. C:            void PrintIText(struct RastPort *, struct IntuiText *, long, long)
  5164. Machine Language:    PrintIText(a0, a1, d0, d1)
  5165. Modula-2:        PrintIText(rastPort: RastPortPtr; intuiText: IntuiTextPtr; leftEdge,
  5166.             topEdge: INTEGER)
  5167. Arguments:        rastPort = RastPort structure to receive text
  5168.             intuiText = IntuiText structure containing text
  5169.             leftEdge = horizontal position of text within RastPort
  5170.             topEdge = vertical position of text within RastPort
  5171. Result:         none
  5172. -------------------------
  5173. Procure
  5174. Description:        obtains a message-based semaphore
  5175. Library:        exec.library
  5176. Offset:         -$021C (-540)
  5177. Modula-2 Module:    Semaphores
  5178. Syntax:         success = Procure(semaphore, message)
  5179. C:            long Procure(struct Semaphore *, struct Message *)
  5180. Machine Language:    d0 = Procure(a0, a1)
  5181. Modula-2:        Procure(semaphore: SemaphorePtr; message: MessagePtr):
  5182.             BOOLEAN
  5183. Arguments:        semaphore = Semaphore structure
  5184.             message = Message structure to be used if desired semaphore is
  5185.             unavailable
  5186. Result:         success = TRUE if successful; FALSE if unsuccessful
  5187. -------------------------
  5188. PutCLBuf
  5189. Description:        converts contiguous data into a character list
  5190. Library:        clist.library
  5191. Offset:         -$006C (-108)
  5192. Modula-2 Module:    none
  5193. Syntax:         error = PutCLBuf(cList, buffer, length)
  5194. C:            long PutCLBuf(long, char *, long)
  5195. Machine Language:    d0 = PutCLBuf(a0, a1, d1)
  5196. Modula-2:        not available
  5197. Arguments:        cList = character list descriptor, as returned by AllocCList( ) or
  5198.             StrToCL( )
  5199.             buffer = buffer containing data to be converted
  5200.             length = size of buffer in bytes
  5201. Result:         error = 0 if successful; nonzero if unsuccessful
  5202. -------------------------
  5203. PutCLChar
  5204. Description:        adds a byte to the end of a character list
  5205. Library:        clist.library
  5206. Offset:         -$003C (-60)
  5207. Modula-2 Module:    none
  5208. Syntax:         error = PutCLChar(cList, byte)
  5209. C:            long PutCLChar(long, long)
  5210. Machine Language:    d0 = PutCLChar(a0, d0)
  5211. Modula-2:        not available
  5212. Arguments:        cList = character list descriptor, as returned by AllocCList( ) or
  5213.             StrToCL( )
  5214.             byte = byte to be added to end of character list
  5215. Result:         error = 0 if successful; nonzero if unsuccessful
  5216. -------------------------
  5217. PutCLWord
  5218. Description:        adds a word to the end of a character list
  5219. Library:        clist.library
  5220. Offset:         -$0054 (-84)
  5221. Modula-2 Module:    none
  5222. Syntax:         error = PutCLWord(cList, word)
  5223. C:            long PutCLWord(long)
  5224. Machine Language:    d0 = PutCLWord(a0, d0)
  5225. Modula-2:        not available
  5226. Arguments:        cList = character list descriptor, as returned by AllocCList( ) or
  5227.             StrToCL( )
  5228.             word = word to be added to end of character list
  5229. Result:         error = 0 if successful; nonzero if unsuccessful
  5230. -------------------------
  5231. PutDiskObject
  5232. Description:        writes a Workbench DiskObject to disk as an .info file
  5233. Library:        icon.library
  5234. Offset:         -$0054 (-84)
  5235. Modula-2 Module:    Icon
  5236. Syntax:         success = PutDiskObject(name, diskObj)
  5237. C:            long PutDiskObject(char *, struct DiskObject *)
  5238. Machine Language:    d0 = PutDiskObject(a0, a1)
  5239. Modula-2:        PutDiskObject(name: STRPTR; diskObj: DiskObjectPtr): BOOLEAN
  5240. Arguments:        name = name of object
  5241.             diskObj = DiskObject structure (.info file)
  5242. Result:         success = nonzero if successful
  5243. -------------------------
  5244. PutIcon
  5245. Description:        writes a DiskObject to disk as an .info file
  5246. Library:        icon.library
  5247. Offset:         -$0030 (-48)
  5248. Modula-2 Module:    none
  5249. Syntax:         success = PutIcon(name, icon)
  5250. C:         long PutIcon(char *, struct DiskObject *)
  5251. Machine Language:    d0 = PutIcon(a0, a1)
  5252. Modula-2:        not available
  5253. Arguments:        name = name of icon (.info file)
  5254.             icon = DiskObject structure
  5255. Result:         success = nonzero if successful
  5256. -------------------------
  5257. PutMsg
  5258. Description:        gets next message from a message port
  5259. Library:        exec.library
  5260. Offset:         -$016E (-366)
  5261. Modula-2 Module:    Ports
  5262. Syntax:         PutMsg(port, message)
  5263. C:            void PutMsg(struct MsgPort *, struct Message *)
  5264. Machine Language:    PutMsg(a0, a1)
  5265. Modula-2:        PutMsg(port: MsgPortPtr; message: ADDRESS)
  5266. Arguments:        port = message port to receive message
  5267.             message = Message structure containing message to send
  5268. Result:         none
  5269. -------------------------
  5270. PutWBObject
  5271. Description:        writes a WBObject to disk as an .info file
  5272. Library:        icon.library
  5273. Offset:         -$0024 (-36)
  5274. Modula-2 Module:    none
  5275. Syntax:         success = PutWBObject(name, object)
  5276. C:            long PutWBObject(char *, struct WBObject *)
  5277. Machine Language:    d0 = PutWBObject(a0, a1)
  5278. Modula-2:        not available
  5279. Arguments:        name = name of WBObject (.info file)
  5280.             object = WBObject structure
  5281. Result:         success = nonzero if successful
  5282. -------------------------
  5283. QBlit
  5284. Description:        queues up a blitter request
  5285. Library:        graphics.library
  5286. Offset:         -$0114 (-276)
  5287. Modula-2 Module:    Blitter
  5288. Syntax:         QBlit(blitNode)
  5289. C:            void QBlit(struct BlitNode *)
  5290. Machine Language:    QBlit(a1)
  5291. Modula-2:        QBlit(blitNode: bltnodePtr)
  5292. Arguments:        blitNode = BlitNode structure containing link information and
  5293.             address of your blitter routine
  5294. Result:         none
  5295. -------------------------
  5296. QBSlit
  5297. Description:        queues and synchronizes a blitter request with the video beam
  5298. Library:        graphics.library
  5299. Offset:         -$0126 (-294)
  5300. Modula-2 Module:    Blitter
  5301. Syntax:         QBSlit(blitNode)
  5302. C:            void QBSlit(struct BlitNode *)
  5303. Machine Language:    QBSlit(a1)
  5304. Modula-2:        QBSlit(blitNode: bltnodePtr)
  5305. Arguments:        blitNode = BlitNode structure containing link information and
  5306.             address of your blitter routine
  5307. Result:         none
  5308. -------------------------
  5309. RangeRand
  5310. Description:        generates a random integer within a specified range
  5311. Library:        amiga.lib (linked library)
  5312. Modula-2 Module:    none
  5313. Syntax:         rnd = RangeRand(range)
  5314. C:            long RangeRand(long)
  5315. Machine Language:    move.l range,-(sp)
  5316.             jsr _RangRand ;rnd returned in d0
  5317.             addq.l #4,sp
  5318. Modula-2:        not available
  5319. Arguments:        range = highest integer acceptable
  5320. Result:         rnd = random number between 0 and value of range argument
  5321. -------------------------
  5322. RASSIZE (macro)
  5323. Description:        calculates the memory requirements for a raster bitmap of the
  5324.             specified with and height
  5325. C Include File:     include/graphics/gfx.h
  5326. ML Include File:    none
  5327. Modula-2 Module:    Graphics
  5328. Syntax:         bytes = RASSIZE(width, height)
  5329. C:            long RASSIZE(long, long)
  5330. Machine Language:    not available
  5331. Modula-2:        RASSIZE(width, height: LONGCARD)
  5332. Arguments:        width = width of hypothetical bitmap in pixels
  5333.             height = height of hypothetical bitmap in pixels
  5334. Result:         bytes = number of bytes required to contain raster bitmap
  5335. -------------------------
  5336. RawDoFmt
  5337. Description:        formats data into a character stream using C formatting
  5338.             commands (%)
  5339. Library:        exec.library
  5340. Offset:         -$020A (-522)
  5341. Modula-2 Module:    Exec
  5342. Syntax:         RawDoFmt(formatString, dataStream, putChProc, putChData)
  5343. C:            void RawDoFmt(char *, APTR, void (*)(), APTR)
  5344. Machine Language:    RawDoFmt(a0, a1, a2, a3)
  5345. Modula-2:        RawDoFmt(formatString, dataStream: ADDRESS; putChProc:
  5346.             PROC; putChData: ADDRESS)
  5347. Arguments:        formatString = string with optional C formatting commands (%)
  5348.             dataStream = stream of data that is interpreted according to the
  5349.             formatString
  5350.             putChProc = address of procedure to call with each character to
  5351.             be output, where procedure is called as PutChProc(char,
  5352.             putChData)
  5353.             putChData = value to pass to PutChProc
  5354. Result:         none
  5355. -------------------------
  5356. Read
  5357. Description:        reads data from a file
  5358. Library:        dos.library
  5359. Offset:         -$002A (-42)
  5360. Modula-2 Module:    DOS
  5361. Syntax:         actualLength = Read(file, buffer, length)
  5362. C:            long Read(BPTR, char *, long)
  5363. Machine Language:    d0 = Read(d1, d2, d3)
  5364. Modula-2:        Read(file: FileHandle; buffer: ADDRESS; length: LONGINT):
  5365.             LONGINT
  5366. Arguments:        file = BCPL pointer to a file handle
  5367.             buffer = address of memory block to receive data
  5368.             length = number of bytes to read (must not exceed buffer size)
  5369. Result:         actualLength = actual number of bytes received
  5370. -------------------------
  5371. ReadExpansionByte
  5372. Description:        reads a byte nybble-by-nybble from a new-style expansion board
  5373. Library:        expansion.library
  5374. Offset:         -$0060 (-96)
  5375. Modula-2 Module:    Expansion
  5376. Syntax:         byte = ReadExpansionByte(board, offset)
  5377. C:            long ReadExpansionByte(long, long)
  5378. Machine Language:    d0 = ReadExpansionByte(a0, d0)
  5379. Modula-2:        ReadExpansionByte(board: ADDRESS; offset: LONGCARD):
  5380.             INTEGER
  5381. Arguments:        board = base address of expansion board
  5382.             offset = logical offset from board base
  5383. Result:         byte = data received; -1 if an error occurred
  5384. -------------------------
  5385. ReadExpansionRom
  5386. Description:        reads a new-style expansion board's configuration ROM space
  5387. Library:        expansion.library
  5388. Offset:         -$0066 (-102)
  5389. Modula-2 Module:    Expansion
  5390. Syntax:         error = ReadExpansionRom(board, configDev)
  5391. C:            long ReadExpansionRom(long, long)
  5392. Machine Language:    d0 = ReadExpansionRom(a0, a1)
  5393. Modula-2:        ReadExpansionRom(board: ADDRESS; configDev: ADDRESS):
  5394.             BOOLEAN
  5395. Arguments:        board = base address of expansion board
  5396.             configDev = ConfigDev structure to receive ROM data
  5397. Result:         error = 0 if successful; nonzero if an error occurred
  5398. -------------------------
  5399. ReadPixel
  5400. Description:        finds the color register (pen) used to color a specific pixel
  5401. Library:        graphics.library
  5402. Offset:         -$013E (-318)
  5403. Modula-2 Module:    Pens
  5404. Syntax:         pen = ReadPixel(rastPort, x, y)
  5405. C:            long ReadPixel(struct RastPort *, long, long)
  5406. Machine Language:    d0 = ReadPixel(a0, d0, d1)
  5407. Modula-2:        ReadPixel(rastPort: RastPortPtr; x, y: INTEGER): INTEGER
  5408. Arguments:        rastPort = RastPort structure
  5409.             x = horizontal coordinate of pixel
  5410.             y = vertical coordinate of pixel
  5411. Result:         pen = pen number; -1 if pixel lies outside boundaries of rastport
  5412. -------------------------
  5413. RectFill
  5414. Description:        fills a rectangular area using the current pen color, outline color,
  5415.             secondary color, and pattern
  5416. Library:        graphics.library
  5417. Offset:         -$0132 (-306)
  5418. Modula-2 Module:    Pens
  5419. Syntax:         RectFill(rastPort, xmin, ymin, xmax, ymax)
  5420. C:            void RectFill(struct RastPort *, long, long, long, long)
  5421. Machine Language:    RectFill(a0, d0, d1, d2, d3)
  5422. Modula-2:        RectFill(rastPortPtr: RastPort; xmin, ymin, xmax, ymax: INTEGER)
  5423. Arguments:        rastPort = RastPort structure
  5424.             xmin = horizontal coordinate rectangle's upper left corner
  5425.             ymin = vertical coordinate rectangle's upper left corner
  5426.             xmax = horizontal coordinate rectangle's lower right corner
  5427.             ymax = vertical coordinate rectangle's lower right corner
  5428. Result:         none
  5429. -------------------------
  5430. RefreshGadgets
  5431. Description:        redraws a gadget and all following gadgets in gadget list
  5432. Library:        intuition.library
  5433. Offset:         -$00DE (-222)
  5434. Modula-2 Module:    Intuition
  5435. Syntax:         RefreshGadgets(gadgets, window, requester)
  5436. C:            void RefreshGadgets(struct Gadget *, struct Window *, struct Re-
  5437.             quester *)
  5438.  
  5439. Machine Language:    RefreshGadgets(a0, a1, a2)
  5440. Modula-2:        RefreshGadgets(gadgets: GadgetPtr; window: WindowPtr; request-
  5441.             er: RequesterPtr)
  5442. Arguments:        gadgets = first gadget in list of gadgets to refresh
  5443.             window = window containing gadgets
  5444.             requester = requester containing gadget; NULL if gadget is not
  5445.             part of a requester
  5446. Result:         none
  5447. -------------------------
  5448. RefreshGList
  5449. Description:        redraws a gadget and specified number of following gadgets in
  5450.             gadget list
  5451. Library:        intuition.library
  5452. Offset:         -$01BO (-432)
  5453. Modula-2 Module:    Intuition
  5454. Syntax:         RefreshGList(gadgets, window, requester, numGadgets)
  5455. C:            void RefreshGList(struct Gadget *, struct Window *, struct Re-
  5456.             quester *, long)
  5457. Machine Language:    RefreshGList(a0, a1, a2, d0)
  5458. Modula-2:        RefreshGList(gadgets: GadgetPtr; window: WindowPtr; requester:
  5459.             RequesterPtr; numGadgets: INTEGER)
  5460. Arguments:        gadgets = first gadget in list of gadgets to refresh
  5461.             window = window containing gadgets
  5462.             requester = requester containing gadget; NULL if gadget is not
  5463.             part of a requester
  5464.             numGadgets = number of gadgets to refresh; -1 to refresh to
  5465.             end of gadget list
  5466. Result:         none
  5467. -------------------------
  5468. RefreshWindowFrame
  5469. Description:        redraws a window's border, title bar, and gadgets
  5470. Library:        intuition.library
  5471. Offset:         -$01C8 (-456)
  5472. Modula-2 Module:    Intuition
  5473. Syntax:         RefreshWindowFrame(window)
  5474. C:            void RefreshWindowFrame(struct Window *)
  5475. Machine Language:    RefreshWindowFrame(a0)
  5476. Modula-2:        RefreshWindowFrame(window: WindowPtr)
  5477. Arguments:        window = window to refresh
  5478. Result:         none
  5479. -------------------------
  5480. ReleaseConfigBinding
  5481. Description:        allows others to bind drivers
  5482. Library:        expansion.library
  5483. Offset:         -$007E (-126)
  5484. Modula-2 Module:    none
  5485. Syntax:         ReleaseConfigBinding( )
  5486. C:            void ReleaseConfigBinding(void)
  5487. Machine Language:    ReleaseConfigBinding( )
  5488. Modula-2:        not available
  5489. Arguments:        none
  5490. Result:         none
  5491. -------------------------
  5492. ReleaseSemaphore
  5493. Description:        releases a signal semaphore for use by other tasks
  5494. Library:        exec.library
  5495. Offset:         -$023A (-5 70)
  5496. Modula-2 Module:    Semaphores
  5497. Syntax:         ReleaseSemaphore(signalSemaphore)
  5498. C:            void ReleaseSemaphore(struct SignalSemaphore *)
  5499. Machine Language:    ReleaseSemaphore(a0)
  5500. Modula-2:        ReleaseSemaphore(signalSemaphore: SignalSemaphorePtr)
  5501. Arguments:        signalSemaphore = initialized SignalSemaphore structure
  5502. Result:         none
  5503. -------------------------
  5504. ReleaseSemaphoreList
  5505. Description:        releases a list of signal semaphores for other tasks
  5506. Library:        exec.library
  5507. Offset:         -$024C (-588)
  5508. Modula-2 Module:    Semaphores
  5509. Syntax:         ReleaseSemaphoreList(list)
  5510. C:            void ReleaseSemaphoreList(struct List *)
  5511. Machine Language:    ReleaseSemaphoreList(a0)
  5512. Modula-2:        ReleaseSemaphoreList(list: SignalSemaphorePtr)
  5513. Arguments:        list = List structure representing a list of signal semaphores
  5514. Result:         none
  5515. -------------------------
  5516. RemakeDisplay
  5517. Description:        redraws every intuition screen
  5518. Library:        intuition.library
  5519. Offset:         -$0180 (-384)
  5520. Modula-2 Module:    Intuition
  5521. Syntax:         RemakeDisplay( )
  5522. C:            void RemakeDisplay(void)
  5523. Machine Language:    RemakeDisplay( )
  5524. Modula-2:        RemakeDisplay( )
  5525. Arguments:        none
  5526. Result:         none
  5527. -------------------------
  5528. RemBob (macro)
  5529. Description:        removes a Bob from current GEL list
  5530. C Include File:     include/graphics/gels.h
  5531. ML Include File:    graphics/gels.i
  5532. Modula-2 Module:    none
  5533. Syntax:         RemBob(bob, rastPort)
  5534. C:            void RemBob(struct Bob *, struct RastPort *)
  5535. Machine Language:    RemBob(a0)
  5536. Modula-2:        not available
  5537. Arguments:        bob = Bob structure to remove
  5538.             rastPort = controlling RastPort structure (not needed in
  5539.             Modula-2)
  5540. Result:         none
  5541. -------------------------
  5542. RemConfigDev
  5543. Description:        removes a ConfigDev structure from the system
  5544. Library:        expansion.library
  5545. Offset:         -$006C (-108)
  5546. Modula-2 Module:    ConfigVars
  5547. Syntax:         RemConfigDev(configDev)
  5548. C:            void RemConfigDev(long)
  5549. Machine Language:    RemConfigDev(a0)
  5550. Modula-2:        RemConfigDev(configDev: ConfigDevPtr)
  5551. Arguments:        configDev = ConfigDev structure
  5552. Result:         none
  5553. -------------------------
  5554. RemDevice
  5555. Description:        removes a device from the system
  5556. Library:        exec.library
  5557. Offset:         -$01B6 (-438)
  5558. Modula-2 Module:    Devices
  5559. Syntax:         error= RemDevice(device)
  5560. C:            long RemDevice(struct Device *)
  5561. Machine Language:    d0 = RemDevice(a1)
  5562. Modula-2:        RemDevice(device: DevicePtr)
  5563. Arguments:        device = device node
  5564. Result:         error = 0 if successful; nonzero if unsuccessful
  5565. -------------------------
  5566. RemFont
  5567. Description:        removes a font from the system
  5568. Library:        graphics.library
  5569. Offset:         -$01E6 (-486)
  5570. Modula-2 Module:    Text
  5571. Syntax:         error = RemFont(textFont)
  5572. C:            long RemFont(struct TextFont *)
  5573. Machine Language:    d0 = RemFont(a1)
  5574. Modula-2:        RemFont(textFont: TextFontPtr)
  5575. Arguments:        textFont = TextFont structure to remove
  5576. Result:         error = 0 if successful; nonzero if unsuccessful (no value returned
  5577.             by Modula-2)
  5578. -------------------------
  5579. RemHead
  5580. Description:        removes a node from the head of a list
  5581. Library:        exec.library
  5582. Offset:         -$0102 (-258)
  5583. Modula-2 Module:    Lists
  5584. Syntax:         node = RemHead(list)
  5585. C:            struct Node *RemHead(struct List *)
  5586. Machine Language:    d0 = RemHead(a0)
  5587. Modula-2:        RemHead(list: ListPtr): NodePtr
  5588. Arguments:        list = list header
  5589. Result:         node = node removed; NULL if list is was already empty
  5590. -------------------------
  5591. RemIBob
  5592. Description:        immediately removes a Bob from the GEL list and erases it from
  5593.             the RastPort display
  5594. Library:        graphics.library
  5595. Offset:         -$0084 (-132)
  5596. Modula-2 Module:    Gels
  5597. Syntax:         RemIBob(bob, rastPort, viewPort)
  5598. C:            void RemIBob(struct Bob *, struct RastPort *, struct ViewPort *)
  5599. Machine Language:    RemIBob(a0, a1, a2)
  5600. Modula-2:        RemIBob(bob: BobPtr; rastPort: RastPortPtr; viewPort:
  5601.             ViewPortPtr)
  5602. Arguments:        bob = Bob structure to remove from GEL list
  5603.             rastPort = RastPort structure
  5604.             viewPort = ViewPort structure
  5605. Result:         none
  5606. -------------------------
  5607. RemIntServer
  5608. Description:        removes an interrupt server from the system
  5609. Library:        exec.library
  5610. Offset:         -$00AE (-174)
  5611. Modula-2 Module:    Interrupts/
  5612. Syntax:         RemIntServer(intNum, interrupt)
  5613. C:            void RemIntServer(long, struct Interrupt *)
  5614. Machine Language:    RemIntServer(d0, a1)
  5615. Modula-2:        RemIntServer(intNum: CARDINAL; interrupt: InterruptPtr)
  5616. Arguments:        intNum = portia interrupt bit (0-4)
  5617.             interrupt = interrupt server node
  5618. Result:         none
  5619. -------------------------
  5620. RemLibrary
  5621. Description:        removes a library from the system
  5622. Library:        exec.library
  5623. Offset:         -$0192 (-402)
  5624. Modula-2 Module:    Libraries
  5625. Syntax:         error= RemLibrary(library)
  5626. C:            long RemLibrary(struct Library *)
  5627. Machine Language:    d0 = RemLibrary(a1)
  5628. Modula-2:        RemLibrary(Library: LibraryPtr)
  5629. Arguments:        library = Library structure to remove
  5630. Result:         error = 0 if successful; nonzero if unsuccessful
  5631. -------------------------
  5632. Remove
  5633. Description:        removes a node from a list
  5634. Library:        exec.library
  5635. Offset:         -$00FC (-252)
  5636. Modula-2 Module:    Lists
  5637. Syntax:         Remove(node)
  5638. C:            void Remove(struct Node *)
  5639. Machine Language:    Remove(a1)
  5640. Modula-2:        Remove(node: NodePtr)
  5641. Arguments:        node = node to remove
  5642. Result:         none
  5643. -------------------------
  5644. RemoveGadget
  5645. Description:        removes gadget from a window
  5646. Library:        intuition.library
  5647. Offset:         -$00E4 (-228)
  5648. Modula-2 Module:    Intuition
  5649. Syntax:         position = RemoveGadget(window, gadget)
  5650. C:            long RemoveGadget(struct Window *, struct Gadget *)
  5651. Machine Language:    d0 = RemoveGadget(a0, a1)
  5652. Modula-2:        RemoveGadget(window: WindowPtr; gadget: GadgetPtr):
  5653.             INTEGER
  5654. Arguments:        window = window that contains gadget
  5655.             gadget = gadget to remove
  5656. Result:         position = position in gadget list where gadget was located; -1 if
  5657.             gadget was not found
  5658. -------------------------
  5659. RemoveGList
  5660. Description:        removes a series of gadgets from a gadget list
  5661. Library:        intuition.library
  5662. Offset:         -$01BC (-444)
  5663. Modula-2 Module:    Intuition
  5664. Syntax:         position = RemoveGList(window, gadget, numGadgets)
  5665. C:            long RemoveGList(struct Window *, Gadget *, long)
  5666. Machine Language:    d0 = RemoveGList(a0, a1, d0)
  5667.  
  5668. Modula-2:        RemoveGList(window: WindowPtr; gadget: GadgetPtr;
  5669.             numGadgets: INTEGER): INTEGER
  5670. Arguments:        window = window containing gadgets
  5671.             gadget = first gadget in gadget list to remove
  5672.             numGadgets = number of gadgets to remove
  5673. Result:         position = position of removed gadget list; -1 if gadget was not
  5674.             found
  5675. -------------------------
  5676. RemPort
  5677. Description:        removes a message port from the system
  5678. Library:        exec.library
  5679. Offset:         -$0168 (-360)
  5680. Modula-2 Module:    Ports
  5681. Syntax:         RemPort(port)
  5682. C:            void RemPort(struct MsgPort *)
  5683. Machine Language:    RemPort(a1)
  5684. Modula-2:        RemPort(port: MsgPortPtr)
  5685. Arguments:        port = message port to remove
  5686. Result:         none
  5687. -------------------------
  5688. RemResource
  5689. Description:        removes a resource from the system
  5690. Library:        exec.library
  5691. Offset:         -$01EC (-492)
  5692. Modula-2 Module:    Resources
  5693. Syntax:         RemResource(resource)
  5694. C:            void RemResource(struct Resource *)
  5695. Machine Language:    RemResource(a1)
  5696. Modula-2:        RemResource(resource: ResourcePtr)
  5697. Arguments:        resource = resource to remove
  5698. Result:         none
  5699. -------------------------
  5700. RemSemaphore
  5701. Description:        removes signal semaphore from the system
  5702. Library:        exec.library
  5703. Offset:         -$025E (-606)
  5704. Modula-2 Module:    Semaphores
  5705. Syntax:         RemSemaphore(signalSemaphore)
  5706. C:            void RemSemaphore(struct SignalSemaphore *)
  5707. Machine Language:    RemSemaphore(a1)
  5708. Modula-2:        RemSemaphore(signalSemaphore: SignalSemaphorePtr)
  5709. Arguments:        signalSemaphore = signal semaphore to remove
  5710. Result:         none
  5711. -------------------------
  5712. RemTail
  5713. Description:        removes node from the tail of a list
  5714. Library:        exec.library
  5715. Offset:         -$0108 (-264)
  5716. Modula-2 Module:    Lists
  5717. Syntax:         node = RemTail(list)
  5718. C:            struct Node *RemTail(struct List *)
  5719. Machine Language:    d0 = RemTail(a0)
  5720. Modula-2:        RemTail(list: ListPtr): NodePtr
  5721. Arguments:        list = list header
  5722. Result:         node = pointer to removed node; NULL if list is already empty
  5723. -------------------------
  5724. RemTask
  5725. Description:        removes a task from the system
  5726. Library:        exec.library
  5727. Offset:         -$0120 (-288)
  5728. Modula-2 Module:    Tasks
  5729. Syntax:         RemTask(task)
  5730. C:            void RemTask(struct Task *)
  5731. Machine Language:    RemTask(a1)
  5732. Modula-2:        RemTask(task: TaskPtr)
  5733. Arguments:        task = task to remove
  5734. Result:         none
  5735. -------------------------
  5736. RemTOF
  5737. Description:        removes a task from the TopOfFrame (vertical-blanking interval)
  5738.             interrupt server chain
  5739. Library:        amiga.lib (linked library)
  5740. Modula-2 Module:    none
  5741. Syntax:         RemTOF(i)
  5742. C:            void RemTOF(struct Isrvstr *)
  5743. Machine Language:    pea i
  5744.             jsr _RemTOF
  5745.             addq.l #4,sp
  5746. Modula-2:        not available
  5747. Arguments:        i = Isrvstr structure
  5748. Result:         none
  5749. -------------------------
  5750. RemVSprite
  5751. Description:        removes a VSprite from the GEL list
  5752. Library:        graphics.library
  5753. Offset:         -$008A (-138)
  5754. Modula-2 Module:    Gels
  5755. Syntax:         RemVSprite(vSprite)
  5756. C:            void RemVSprite(struct VSprite *)
  5757. Machine Language:    RemVSprite(a0)
  5758. Modula-2:        RemVSprite(vSprite: VSpritePtr)
  5759. Arguments:        vSprite = VSprite to remove
  5760. Result:         none
  5761. -------------------------
  5762. Rename
  5763. Description:        renames a directory or file
  5764. Library:        dos.library
  5765. Offset:         -$004E (-78)
  5766. Modula-2 Module:    DOS
  5767. Syntax:         success = Rename(oldName, newName)
  5768. C:            long Rename(char *, char *)
  5769. Machine Language:    d0 = Rename(d1, d2)
  5770. Modula-2:        Rename(oldName, newName: STRPTR): BOOLEAN
  5771. Arguments:        oldName = current name of file/directory (can include
  5772.             drive/directory path)
  5773.             newName = new name for file (can include drive/directory path)
  5774. Result:         success = TRUE if successful; FALSE if unsuccessful
  5775. -------------------------
  5776. ReplyMsg
  5777. Description:        replies to a message
  5778. Library:        exec.library
  5779. Offset:         -$017A (-378)
  5780. Modula-2 Module:    Ports
  5781. Syntax:         ReplyMsg(message)
  5782. C:            void ReplyMsg(struct MsgPort *)
  5783. Machine Language:    ReplyMsg(a1)
  5784. Modula-2:        ReplyMsg(message: ADDRESS)
  5785. Arguments:        message = message to reply to
  5786. Result:         none
  5787. -------------------------
  5788. ReportMouse
  5789. Description:        tells intuition whether or not to report the mouse movements as-
  5790.             sociated with a window
  5791. Library:        intuition.library
  5792. Offset:         -$00EA (-234)
  5793. Modula-2 Module:    Intuition
  5794. Syntax:         ReportMouse(window, flag)
  5795. C:            void ReportMouse(struct Window *, long)
  5796. Machine Language:    ReportMouse(a0, d0)
  5797. Modula-2:        ReportMouse(window: WindowPtr; flag: BOOLEAN)
  5798. Arguments:        window = window to be affected
  5799.             flag = TRUE to activate mouse movement reports; FALSE to stop
  5800.             mouse movement reports
  5801. Result:         none
  5802. -------------------------
  5803. Request
  5804. Description:        activates a requester
  5805. Library:        intuition.library
  5806. Offset:         -$00F0 (-240)
  5807. Modula-2 Module:    Intuition
  5808. Syntax:         success = Request(requester, window)
  5809. C:            long Request(struct Requester, struct Window *)
  5810. Machine Language:    d0 = Request(a0, a1)
  5811. Modula-2:        Request(requester: RequesterPtr; window: WindowPtr): BOOLEAN
  5812. Arguments:        requester = requester to display
  5813.             window = window in which requester will appear in
  5814. Result:         success = TRUE if successful; FALSE if unsuccessful
  5815. -------------------------
  5816. RethinkDisplay
  5817. Description:        performs a complete overhaul on the Intuition display-screens,
  5818.             ViewPorts, everything
  5819. Library:        intuition.library
  5820. Offset:         -$0186 (-390)
  5821. Modula-2 Module:    Intuition
  5822. Syntax:         RethinkDisplay( )
  5823. C:            void RethinkDisplay(void)
  5824. Machine Language:    RethinkDisplay( )
  5825. Modula-2:        RethinkDisplay( )
  5826. Arguments:        none
  5827. Result:         none
  5828. -------------------------
  5829. ScreenToBack
  5830. Description:        moves specified screen to back of the display
  5831. Library:        intuition.library
  5832. Offset:         -$00F6 (-246)
  5833. Modula-2 Module:    Intuition
  5834. Syntax:         ScreenToBack(screen)
  5835. C:            void ScreenToBack(struct Screen *)
  5836. Machine Language:    ScreenToBack(a0)
  5837. Modula-2:        ScreenToBack(screen: ScreenPtr)
  5838. Arguments:        screen = screen to move
  5839. Result:         none
  5840. -------------------------
  5841. ScreenToFront
  5842. Description:        moves specified screen to front of the display
  5843. Library:        intuition.library
  5844. Offset:         -$00FC (-252)
  5845. Modula-2 Module:    Intuition
  5846. Syntax:         ScreenToFront(screen)
  5847. C:            void ScreenToFront(struct Screen *)
  5848. Machine Language:    ScreenToFront(a0)
  5849. Modula-2:        ScreenToFront(screen: ScreenPtr)
  5850. Arguments:        screen = screen to move
  5851. Result:         none
  5852. -------------------------
  5853. ScrollLayer
  5854. Description:        copies data from a SuperBitMap to a layer so as to reposition the
  5855.             display over the bitmap
  5856. Library:        layers.library
  5857. Offset:         -$0048 (-72)
  5858. Modula-2 Module:    Layers
  5859. Syntax:         ScrollLayer(dummy, layer, dx, dy)
  5860. C:            void ScrollLayer(struct Layer_Info *, struct Layer *, long, long)
  5861. Machine Language:    ScrollLayer(a0, a1, d0, d1)
  5862. Modula-2:        ScrollLayer(layer: LayerPtr; dx, dy: LONGINT)
  5863. Arguments:        dummy = unused
  5864.             layer = Layer structure
  5865.             dx = offset by which to move layer horizontally
  5866.             dy = offset by which to move layer vertically
  5867. Result:         none
  5868. -------------------------
  5869. ScrollRaster
  5870. Description:        scrolls the contents of a rectangular area of a RastPort
  5871. Library:        graphics.library
  5872. Offset:         -$018C (-396)
  5873. Modula-2 Module:    Rasters
  5874. Syntax:         ScrollRaster(rastPort, dx, dy, x1, y1, x2, y2)
  5875. C:            void ScrollRaster(struct RastPort *, long, long, long, long, long,
  5876.             long)
  5877. Machine Language:    ScrollRaster(a0, d0, d1, d2, d3, d4, d5)
  5878. Modula-2:        ScrollRaster(rastPort: RastPortPtr; dx, dy: INTEGER; x1, y1, x2,
  5879.             y2: INTEGER)
  5880. Arguments:        rastPort = RastPort structure
  5881.             dx = offset by which to scroll the rectangle
  5882.             dy = offset by which to scroll the rectangle
  5883.             x1 = horizontal position of the left edge of the rectangle
  5884.             y1 = vertical position of the top edge of the rectangle
  5885.             x2 = horizontal position of the right edge of the rectangle
  5886.             y2 = vertical position of the bottom edge of the rectangle
  5887. Result:         none
  5888. -------------------------
  5889. ScrollVPort
  5890. Description:        scrolls the contents of a rectangular area of a ViewPort by reinter-
  5891.             preting the RasInfo information in a ViewPort
  5892. Library:        graphics.library
  5893. Offset:         -$024C (-588)
  5894. Modula-2 Module:    Views
  5895. Syntax:         ScrollVPort(viewPort)
  5896. C:            void ScrollVPort(struct ViewPort *)
  5897. Machine Language:    ScrollVPort(a0)
  5898. Modula-2:        ScrollVPort(viewPort: ViewPortPtr)
  5899. Arguments:        viewPort = ViewPort structure to update
  5900. Result:         none
  5901. -------------------------
  5902. Seek
  5903. Description:        moves the file pointer to a specified position in a file
  5904. Library:        dos.library
  5905. Offset:         -$0042 (-66)
  5906. Modula-2 Module:    DOS
  5907. Syntax:         oldPosition = Seek(file, position, mode)
  5908. C:            long Seek(BPTR, long, long)
  5909. Machine Language:    d0 = Seek(d1, d2, d3)
  5910. Modula-2:        Seek(file: FileHandle; position: LONGINT; mode: LONGINT):
  5911.             LONGINT
  5912. Arguments:        file = BCPL pointer to a file handle
  5913.             position = offset by which to move file pointer
  5914.             mode = flag specifying how to interpret position offset-
  5915.             OFFSET_BEGINNING (-1), OFFSET_CURRENT (0), or
  5916.             OFFSET_END (1)
  5917. Result:         oldPosition = old file position; -1 if unsuccessful
  5918. -------------------------
  5919. SendIO
  5920. Description:        sends an IO request
  5921. Library:        exec.library
  5922. Offset:         -$01CE (-462)
  5923. Modula-2 Module:    IO
  5924. Syntax:         SendIO(ioRequest)
  5925. C:            void SendIO(struct IORequest *)
  5926. Machine Language:    SendIO(a1)
  5927. Modula-2:        SendIO(ioRequest: ADDRESS)
  5928. Arguments:        IORequest = an initialized IORequest structure
  5929. Result:         none
  5930. -------------------------
  5931. SetAfPt (macro)
  5932. Description:        sets area fill pattern
  5933. C Include File:     include/graphics/gfxmacros.h
  5934. ML Include File:    none
  5935. Modula-2 Module:    Pens
  5936. Syntax:         SetAfPt(rastPort, pattern, size)
  5937. C:            void SetAfPt(struct RastPort *, char *, long)
  5938. Machine Language:    not available
  5939. Modula-2:        SetAfPat(rastPort: RastPortPtr; pattern: ADDRESS; size:
  5940.             CARDINAL)
  5941. Arguments:        rastPort = RastPort structure
  5942.             pattern = pointer to the first word in an area-fill pattern
  5943.             size = size of area pattern (size to the power of two equals the
  5944.             number of words in pattern)
  5945. Result:         none
  5946. -------------------------
  5947. SetAPen
  5948. Description:        sets the primary pen color
  5949. Library:        graphics.library
  5950. Offset:         -0156 (-342)
  5951. Modula-2 Module:    Pens
  5952. Syntax:         SetAPen(rastPort, pen)
  5953. C:            void SetAPen(struct RastPort *, long)
  5954. Machine Language:    SetAPen(a1, d0)
  5955. Modula-2:        SetAPen(rastPort: RastPortPtr; pen: CARDINAL)
  5956. Arguments:        rastPort = RastPort structure
  5957.             pen = pen number (0-255)
  5958. Result:         none
  5959. -------------------------
  5960. SetBPen
  5961. Description:        sets the secondary pen color
  5962. Library:        graphics.library
  5963. Offset:         -015C (-348)
  5964. Modula-2 Module:    Drawing
  5965. Syntax:         SetBPen(rastPort, pen)
  5966. C:            void SetBPen(struct RastPort *, long)
  5967. Machine Language:    SetBPen(al, d0)
  5968. Modula-2:        SetBPen(rastPort: RastPortPtr; pen: CARDINAL)
  5969. Arguments:        rastPort = RastPort structure
  5970.             pen = pen number (0-255)
  5971. Result:         none
  5972. -------------------------
  5973. SetCollision
  5974. Description:        sets a collision vector to point to a user-written routine
  5975. Library:        graphics.library
  5976. Offset:         -0090 (-144)
  5977. Modula-2 Module:    Gels
  5978. Syntax:         SetCollision(number, routine, gelsInfo)
  5979. C:            void SetCollision(long, _fgptr, struct GelsInfo *)
  5980. Machine Language:    SetCollision(d0, a0, a1)
  5981. Modula-2:        SetCollision(number: LONGCARD; routine: PROC; gelsInfo:
  5982.             GelsInfoPtr)
  5983. Arguments:        number = collision vector number
  5984.             routine = pointer to user's collision routine
  5985.             gelsInfo = GelsInfo structure
  5986. Result:         none
  5987. -------------------------
  5988. SetComment
  5989. Description:        adds a comment to a file
  5990. Library:        dos.library
  5991. Offset:         -00B4 (-180)
  5992. Modula-2 Module:    DOS
  5993. Syntax:         success = SetComment(name, comment)
  5994. C:            long SetComment(char *, char *)
  5995. Machine Language:    d0 = SetComment(d1, d2)
  5996. Modula-2:        SetComment(name, comment: STRPTR): BOOLEAN
  5997. Arguments:        name = filename of file to comment
  5998.             comment = comment to add to file
  5999. Result:         success = TRUE if successful; FALSE if unsuccessful
  6000. -------------------------
  6001. SetCurrentBinding
  6002. Description:        sets static board configuration area
  6003. Library:        expansion.library
  6004. Offset:         -$0084 (-132)
  6005. Modula-2 Module:    none
  6006. Syntax:         SetCurrentBinding(currentBinding, size)
  6007. C:            void SetCurrentBinding(long, long)
  6008. Machine Language:    SetCurrentBinding(a0, d0)
  6009. Modula-2:        not available
  6010. Arguments:        currentBinding = CurrentBinding structure
  6011.             size = size of user's BindDriver structure
  6012. Result:         none
  6013. -------------------------
  6014. SetDMRequest
  6015. Description:        attaches a DMRequester (a requester activated when the mouse's
  6016.             menu button is double clicked) to a window
  6017. Library:        intuition.library
  6018. Offset:         -0102 (-258)
  6019. Modula-2 Module:    Intuition
  6020. Syntax:         success = SetDMRequest(window, dmRequester)
  6021. C:            long SetDMRequest(struct Window *, struct Requester *)
  6022. Machine Language:    d0 = SetDMRequest(a0, a1)
  6023. Modula-2:        SetDMRequest(window: WindowPtr; dmRequester: RequesterPtr)
  6024. Arguments:        window = window to which the requester will be added
  6025.             dmRequester = requester to attach
  6026. Result:         success = TRUE if successful; FALSE if unsuccessful (nothing re-
  6027.             turned by Modula-2)
  6028. -------------------------
  6029. SetDrMd
  6030. Description:        sets a drawing mode for drawing routines
  6031. Library:        graphics.library
  6032. Offset:         -0162 (-354)
  6033. Modula-2 Module:    Pens
  6034. Syntax:         SetDrMd(rastPort, mode)
  6035. C:            void SetDrMd(struct RastPort *, long)
  6036. Machine Language:    SetDrMd(a1, d0)
  6037. Modula-2:        SetDrMd(rastPort: RastPortPtr; mode: DrawingModeSet)
  6038. Arguments:        rastPort = RastPort structure
  6039.             mode = drawing mode JAM1, JAM2, COMPLEMENT,
  6040.             INVERSVID)
  6041. Result:         none
  6042. -------------------------
  6043. SetDrPt (macro)
  6044. Description:        sets a pattern to use for line drawing
  6045. C Include File:     include/graphics/gfxmacros.h
  6046. ML Include File:    none
  6047. Modula-2 Module:    Pens
  6048. Syntax:         SetDrPt(rastPort, pattern)
  6049. C:            void SetDrPt(struct RastPort *, long)
  6050. Machine Language:    not available
  6051. Modula-2:        SetDrPt(rastPort: RastPortPtr; pattern: BITSET)
  6052. Arguments:        rastPort = RastPort structure
  6053.             pattern = 16-bit drawing pattern
  6054. Result:         none
  6055. -------------------------
  6056. SetExcept
  6057. Description:        defines which signals cause an exception
  6058. Library:        exec.library
  6059. Offset:         -0138 (-312)
  6060. Modula-2 Module:    Tasks
  6061. Syntax:         oldSignals = SetExcept(newSignals, signalMask)
  6062. C:            long SetExcept(long, long)
  6063. Machine Language:    d0 = SetExcept(d0, d1)
  6064. Modula-2:        SetExcept(newSignals, signalMask: SignalSet): SignalSet
  6065. Arguments:        newSignals = new values for signals specified in signalMask
  6066.             signalMask = set of signals to be affected
  6067. Result:         oldSignals = prior exception signals
  6068. -------------------------
  6069. SetFont
  6070. Description:        sets the font to be used for drawing text in a rastport
  6071. Library:        graphics.library
  6072. Offset:         -0042 (-66)
  6073. Modula-2 Module:    Text
  6074. Syntax:         SetFont(rastPort, font)
  6075. C:            void SetFont(struct RastPort *, struct TextFont *)
  6076. Machine Language:    SetFont(a1/ a0)
  6077. Modula-2:        SetFont(rastPort: RastPortPtr; font: TextFontPtr)
  6078. Arguments:        rastPort = RastPort structure
  6079.             font = font descriptor obtained from OpenFont( ) function
  6080. Result:         none
  6081. -------------------------
  6082. SetFunction
  6083. Description:        changes a function vector in a library
  6084. Library:        exec.library
  6085. Offset:         -01A4 (-420)
  6086. Modula-2 Module:    Libraries
  6087. Syntax:         oldFunc = SetFunction(library, offset, newFunc)
  6088. C:            _fptr SetFunction(struct Library *, long,_fptr)
  6089. Machine Language:    d0 = SetFunction(a1, a0, d0)
  6090. Modula-2:        SetFunction(library: LibraryPtr; offset: INTEGER; newFunc:
  6091.             PROC): PROC
  6092. Arguments:        library = library to change
  6093.             offset = offset of function vector to change
  6094.             newFunc = address of new function
  6095. Result:         oldFunc = address of old function
  6096. -------------------------
  6097. SetIntVector
  6098. Description:        changes a system interrupt vector
  6099. Library:        exec.library
  6100. Offset:         -00A2 (-162)
  6101. Modula-2 Module:    Interrupts
  6102. Syntax:         oldInt = SetIntVector(intNum, newInt)
  6103. C:            struct Interrupt *SetIntVector(long, struct Interrupt *)
  6104. Machine Language:    d0 = SetIntVector(d0, a1)
  6105. Modula-2:        SetIntVector(intNum: CARDINAL; newInt: InterruptPtr):
  6106.             InterruptPtr
  6107. Arguments:        intNum = Portia interrupt bit number (0-14)
  6108.             newInt = initialized Interrupt structure
  6109. Result:         oldInt = old Interrupt structure
  6110. -------------------------
  6111. SetMenuStrip
  6112. Description:        attaches a menu strip to a window
  6113. Library:        intuition.library
  6114. Offset:         -0108 (-264)
  6115. Modula-2 Module:    Intuition
  6116. Syntax:         SetMenuStrip(window, menu)
  6117. C:            void SetMenuStrip(struct Window *, struct Menu *)
  6118. Machine Language:    SetMenuStrip(a0, a1)
  6119. Modula-2:        SetMenuStrip(window: WindowPtr; menu: MenuPtr)
  6120. Arguments:        window = window to receive menu strip
  6121.             menu = first menu in menu strip
  6122. Result:         none
  6123. -------------------------
  6124. SetOPen (macro)
  6125. Description:        sets the color of the pen used for outlining figures and tums on
  6126.             outlining
  6127. C Include File:     include/graphics/gfxmacros.h
  6128. ML Include File:    none
  6129. Modula-2 Module:    Pens
  6130. Syntax:         SetOPen(rastPort, pen)
  6131. C:            void SetOPen(struct RastPort *, long)
  6132. Machine Language:    not available
  6133. Modula-2:        SetOPen(rastPort: RastPortPtr; pen: CARDINAL)
  6134. Arguments:        rastPort = RastPort structure
  6135.             pen = pen number (0-255)
  6136. Result:         none
  6137. -------------------------
  6138. SetPointer
  6139. Description:        sets the shape of a window's sprite mouse pointer
  6140. Library:        intuition.library
  6141. Offset:         -010E (-270)
  6142. Modula-2 Module:    Intuition
  6143. Syntax:         SetPointer(window, pointer, height, width, xOffset, yOffset)
  6144. C:            void SetPointer(struct Window *, short *, long, long, long, long)
  6145. Machine Language:    SetPointer(a0, a1, d0, d1, d2, d3)
  6146. Modula-2:        SetPointer(window: WindowPtr; pointer: ADDRESS; height,
  6147.             width: CARDINAL; xOffset, y: INTEGER)
  6148. Arguments:        window = window to receive new pointer
  6149.             pointer = sprite data defining new shape
  6150.             height = height of sprite in lines
  6151.             width = width of sprite in pixels (less than or equal to 16)
  6152.             xOffset = horizontal offset of pointer hot spot
  6153.             yOffset = vertical offset of pointer hot spot
  6154. Result:         none
  6155. -------------------------
  6156. SetPrefs
  6157. Description:        changes Preferences' current settings
  6158. Library:        intuition.library
  6159. Offset:         -$0144 (-324)
  6160. Modula-2 Module:    Preferences
  6161. Syntax:         prefBuffer = SetPrefs(prefBuffer, size, inform)
  6162. C:            struct Preferences *SetPrefs(struct Preferences *, long, long)
  6163. Machine Language:    d0 = SetPrefs(a0, d0, d1)
  6164. Modula-2:        SetPrefs(prefBuffer: ADDRESS; size: INTEGER; inform:
  6165.             BOOLEAN)
  6166. Arguments:        prefBuffer = buffer which contains your desired Preferences
  6167.             settings
  6168.             size = size of buffer in bytes
  6169.             inform = TRUE if you want to send a NEWPREFS message to all
  6170.             interested windows
  6171. Result:         prefBuffer = pointer to your prefBuffer
  6172. -------------------------
  6173. SetProtection
  6174. Description:        sets a file or directories protection bits
  6175. Library:        dos.library
  6176. Offset:         -00BA (-186)
  6177. Modula-2 Module:    DOS
  6178. Syntax:         success = SetProtection(name, mask)
  6179. C:            long SetProtection(char *, long)
  6180. Machine Language:    d0 = SetProtection(d1, d2)
  6181. Modula-2:        SetProtection(name: STRPTR; mask: ProtectionSet): BOOLEAN
  6182. Arguments:        name = file or directory name
  6183.             mask = protection bits to set
  6184. Result:         success = TRUE if successful; FALSE if unsuccessful
  6185. -------------------------
  6186. SetRast
  6187. Description:        sets the entire rastport to a specified color
  6188. Library:        graphics.library
  6189. Offset:         -00EA (-234)
  6190. Modula-2 Module:    Rasters
  6191. Syntax:         SetRast(rastPort, pen)
  6192. C:            void SetRast(struct RastPort *, long)
  6193. Machine Language:    SetRast(a1, d0)
  6194. Modula-2:        SetRast(rastPort: RastPortPtr; pen: CARDINAL)
  6195. Arguments:        rastPort = RastPort structure
  6196.             pen = color register used to color the rastport (0-31)
  6197. Result:         none
  6198. -------------------------
  6199. SetRGB4
  6200. Description:        sets the red, green, and blue values for a viewport's color register
  6201. Library:        graphics.library
  6202. Offset:         -0120 (-288)
  6203. Modula-2 Module:    Views
  6204. Syntax:         SetRGB4(viewPort, pen, red, green, blue)
  6205. C:            void SetRGB4(struct ViewPort *, long, long, long, long)
  6206. Machine Language:    SetRGB4(a0, d0, d1, d2, d3)
  6207. Modula-2:        SetRGB4(viewPort: ViewPortPtr; pen: INTEGER; red, green, blue:
  6208.             CARDINAL)
  6209. Arguments:        viewPort = ViewPort structure
  6210.             pen = color register to set (0-31)
  6211.             red = red color level (0-15)
  6212.             green = green color level (0-15)
  6213.             blue = blue color level (0-15)
  6214. Result:         none
  6215. -------------------------
  6216. SetRGB4CM
  6217. Description:        sets the red, green, and blue values for a colormap's color register
  6218. Library:        graphics.library
  6219. Offset:         -0276 (-630)
  6220. Modula-2 Module:    Views
  6221. Syntax:         SetRGB4CM(colorMap, pen, red, green, blue)
  6222. C:            void SetRGB4CM(struct ColorMap *, long, long, long, long)
  6223. Machine Language:    SetRGB4CM(a0, d0, d1, d2, d3)
  6224. Modula-2:        SetRGB4CM(colorMap: ColorMapPtr; pen: INTEGER; red, green,
  6225.             blue: CARDINAL)
  6226. Arguments:        colorMap = ColorMap structure
  6227.             pen = color register to set (0-31)
  6228.             red = red color level (0-15)
  6229.             green = green color level (0-15)
  6230.             blue = blue color level (0-15)
  6231. Result:         none
  6232. -------------------------
  6233. SetSignal
  6234. Description:        defines the state of a task's signals
  6235. Library:        exec.library
  6236. Offset:         -0132 (-306)
  6237. Modula-2 Module:    Tasks
  6238. Syntax:         oldSignals = SetSignal(newSignals, signalMask)
  6239. C:            long SetSignal(long, long)
  6240. Machine Language:    d0 = SetSignal(d0, d1)
  6241. Modula-2:        SetSignal(newSignals, signalMask: SignalSet): SignalSet
  6242. Arguments:        newSignals = new values for signals specified in signalMask
  6243.             signalMask = set of signals to be affected
  6244. Result:         oldSignals = prior values for signals
  6245. -------------------------
  6246. SetSoftStyle
  6247. Description:        sets the style for the current font
  6248. Library:        graphics.library
  6249. Offset:         -005A (-90)
  6250. Modula-2 Module:    Text
  6251. Syntax:         newStyle = SetSoftStyle(rastPort, style, enable)
  6252. C:            long SetSoftStyle(struct RastPort *, long, long)
  6253. Machine Language:    d0 = SetSoftStyle(a1, d0, d1, a6)
  6254. Modula-2:        SetSoftStyle(rastPort: RastPortPtr; style, enable: FontStyleSet):
  6255.             FontStyleSet
  6256. Arguments:        rastPort = RastPort structure
  6257.             style = new font style
  6258.             enable = mask that determines which style bit can be changed;
  6259.             can be derived from AskSoftStyle( ) function
  6260. Result:         newStyle = resulting font style
  6261. -------------------------
  6262. SetSR
  6263. Description:        gets and/or sets the processor's status register
  6264. Library:        exec.library
  6265. Offset:         -0090 (-144)
  6266. Modula-2 Module:    Exec
  6267. Syntax:         oldSR = SetSR(newSR, mask)
  6268. C:            long SetSR(long, long)
  6269. Machine Language:    d0 = SetSR(d0, d1)
  6270. Modula-2:        SetSR(newSR: BITSET; mask: BITSET): BITSET
  6271. Arguments:        newSR = new value for bits specified in mask
  6272.             mask = bits to be affected
  6273. Result:         oldSR = prior value of status register
  6274. -------------------------
  6275. SetTaskPri
  6276. Description:        gets and sets the priority of a task
  6277. Library:        exec.library
  6278. Offset:         -012C (-300)
  6279. Modula-2 Module:    Tasks
  6280. Syntax:         oldPriority = SetTaskPri(task, newPriority)
  6281. C:            long SetTaskPri(struct Task *, long)
  6282. Machine Language:    d0 = SetTaskPri(a1, d0)
  6283. Modula-2:        SetTaskPri(task: TaskPtr; newPriority: INTEGER): INTEGER
  6284. Arguments:        task = task to be affected
  6285.             newPriority = new priority value (0-8)
  6286. Result:         oldPriority = old task priority (0-8)
  6287. -------------------------
  6288. SetWindowTitles
  6289. Description:        sets the titles for both a window and its screen
  6290. Library:        intuition.library
  6291. Offset:         -0114 (-276)
  6292. Modula-2 Module:    Intuition
  6293. Syntax:         SetWindowTitles(window, windowTitle, screenTitle)
  6294. C:            void SetWindowTitles(struct Window *, char *, char *)
  6295. Machine Language:    SetWindowTitles(a0, a1, a2)
  6296. Modula-2:        SetWindowTitles(window: WindowPtr; windowTitle, screenTitle:
  6297.             STRPTR)
  6298. Arguments:        window = window to be affected
  6299.             windowTitle = new window title (-1 to keep as-is)
  6300.             screenTitle = new screen title (-1 to keep as-is)
  6301. Result:         none
  6302. -------------------------
  6303. SetWrMsk (macro)
  6304. Description:        sets the write mask for a rastport (locks and unlocks bitplanes)
  6305. C Include File: include/graphics/gfxmacros.h
  6306. ML Include File:    none
  6307. Modula-2 Module:    Pens
  6308. Syntax:         SetWrMsk(rastPort, mask)
  6309. C:            void SetWrMsk(struct RastPort *, long)
  6310. Arguments:        cList = character list containing substring
  6311.             index = starting position of substring
  6312.             length = number of bytes to copy
  6313. Result:         cList = new character list that contains the substring; -1 if there
  6314.             is not enough memory
  6315. -------------------------
  6316. SHIFTITEM (macro)
  6317. Description:        shifts a menu value to define a new value for the menu item
  6318.             number
  6319. C Include File:     include/intuition/intuition.h
  6320. ML Include File:    none
  6321. Modula-2 Module:    none
  6322. Syntax:         newValue = SHIFTITEM(menuValue)
  6323. C:            long SHIFTITEM(long)
  6324. Machine Language:    not available
  6325. Modula-2:        not available
  6326. Arguments:        menuValue = 16-bit packed number representing the menu num-
  6327.             ber, item number, and subitem number
  6328. Result:         newValue = the menuValue ANDed with $3F and shifted to the
  6329.             left five times-((menuValue & 0x3F) << 5)
  6330. -------------------------
  6331. SHIFTMENU (macro)
  6332. Description:        extracts the menu number from a value (identical to MENUNUM
  6333.             macro)
  6334. C Include File:     include/intuition/intuition.h
  6335. ML Include File:    none
  6336. Modula-2 Module:    none
  6337. Syntax:         menuNumber= SHIFTMENU(menuValue)
  6338. C:            long SHIFTMENU(long)
  6339. Machine Language:    not available
  6340. Modula-2:        not available
  6341. Arguments:        menuValue = 16-bit packed number representing the menu num-
  6342.             ber, item number, and subitem number
  6343. Result:         menuNumber = menu number (0-31); equals NOMENU if no
  6344.             menu was selected
  6345. -------------------------
  6346. SHIFTSUB (macro)
  6347. Description:        shifts a menu value to define a new value for the menu subitem
  6348.             number
  6349. C Include File:     include/intuition/intuition.h
  6350. ML Include File:    none
  6351. Modula-2 Module:    none
  6352. Syntax:         newValue = SHIFTSUB(menuValue)
  6353. C:            long SHIFTSUB(long)
  6354. Machine Language:    not available
  6355. Modula-2:        not available
  6356. Arguments:        menuValue = 16-bit packed number representing the menu num-
  6357.             ber, item number, and subitem number
  6358. Result:         newValue = the menuValue ANDed with $1F and shifted to the
  6359.             left 11 times-((menuValue & 0x1F) << 11)
  6360. -------------------------
  6361. ShowTitle
  6362. Description:        determines whether the screen title bar will be displayed in front
  6363.             of a backdrop window
  6364. Library:        intuition.library
  6365. Offset:         -011A (-282)
  6366. Modula-2 Module:    Intuition
  6367. Syntax:         ShowTitle(screen, showIt)
  6368. C:            void ShowTitle(struct Screen *, long)
  6369. Machine Language:    ShowTitle(a0, d0)
  6370. Modula-2:        ShowTitle(screen: ScreenPtr; showIt: BOOLEAN)
  6371. Arguments:        screen = screen to be affected
  6372.             showIt = flag that indicates whether or not to display the screen's
  6373.             title bar in front of a backdrop window (TRUE means show the
  6374.             title bar; FALSE means hide it)
  6375. Result:         none
  6376. -------------------------
  6377. Signal
  6378. Description:        signals a task with specified signals
  6379. Library:        exec.library
  6380. Offset:         -0144 (-324)
  6381. Modula-2 Module:    Tasks
  6382. Syntax:         Signal(task, signals)
  6383. C:            void Signal(struct Task *, long)
  6384. Machine Language:    Signal(d0, d1)
  6385. Modula-2:        Signal(task: TaskPtr; signals: SignalSet)
  6386. Arguments:        task = task to be signaled
  6387.             signals = signals to send
  6388. Result:         none
  6389. -------------------------
  6390. SizeCList
  6391. Description:        gets the size of a character list in bytes
  6392. Library:        clist.library
  6393. Offset:         -0036 (-54)
  6394. Modula-2 Module:    none
  6395. Syntax:         size = SizeCList(cList)
  6396. C:            long SizeCList(long)
  6397. Machine Language:    d0 = SizeCList(a0)
  6398. Modula-2:        not available
  6399. Arguments:        cList = character list in question
  6400. Result:         size = number of bytes in character list
  6401. -------------------------
  6402. SizeLayer
  6403. Description:        changes the size of a nonbackdrop layer
  6404. Library:        layers.library
  6405. Offset:         -0042 (-66)
  6406. Modula-2 Module:    Layers
  6407. Syntax:         SizeLayer(dummy, layer, dx, dy)
  6408. C:            long SizeLayer(struct Layer_Info *, struct Layer *, long, long)
  6409. Machine Language:    d0 = SizeLayer(a0, a1, d0, d1)
  6410. Modula-2:        SizeLayer(layer: LayerPtr; dx, dy: LONGINT): BOOLEAN
  6411. Arguments:        dummy = unused
  6412.             layer = a nonbackdrop Layer structure
  6413.             dx = amount to add to layer's horizontal size (may be negative)
  6414.             dy = amount to add to layer's vertical size (may be negative)
  6415. Result:         TRUE if successful; FALSE if unsuccessful
  6416. -------------------------
  6417. SizeWindow
  6418. Description:        resizes a window
  6419. Library:        intuition.library
  6420. Offset:         -0120 (-288)
  6421. Modula-2 Module:    Intuition
  6422. Syntax:         SizeWindow(window, dx, dy)
  6423. C:            void SizeWindow(struct Window *, long, long)
  6424. Machine Language:    SizeWindow(a0, d0, d1)
  6425. Modula-2:        SizeWindow(window: WindowPtr; dx, dy: INTEGER)
  6426. Arguments:        window = window to be resized
  6427.             dx = amount to add to window's horizontal size (may be
  6428.             negative)
  6429.             dy = amount to add to window's vertical size (may be negative)
  6430. Result:         none
  6431. -------------------------
  6432. SortGList
  6433. Description:        sorts the GEL list by vertical position of each element, prior to
  6434.             displaying the GELs
  6435. Library:        graphics.library
  6436. Offset:         -0096 (-150)
  6437. Modula-2 Module:    Gels
  6438. Syntax:         SortGList(rastPort)
  6439. C:            void SortGList(struct RastPort *)
  6440. Machine Language:    SortGList(a1)
  6441. Modula-2:        SortGList(rastPort: RastPortPtr)
  6442. Arguments:        rastPort = RastPort structure containing the GelsInfo
  6443. Result:         none
  6444. -------------------------
  6445. SPAbs
  6446. Description:        obtains the absolute value of a floating-point number
  6447. Library:        mathffp.library
  6448. Offset:         -$0036 (-54)
  6449. Modula-2 Module:    none
  6450. Syntax:         fnum1 = SPAbs(fnum2)
  6451. C:            float SPAbs(float)
  6452. Machine Language:    d0 = SPAbs(d0)
  6453. Modula-2:        not available
  6454. Arguments:        fnum2 = floating-point number
  6455. Result:         fnum1 = absolute value of fnum2 in floating-point format
  6456. -------------------------
  6457. SPAcos
  6458. Description:        obtains the arcosine of a floating-point number
  6459. Library:        mathtrans.library
  6460. Offset:         -$0078 (-120)
  6461. Modula-2 Module:    none
  6462. Syntax:         fnum1 = SPAcos(fnum2)
  6463. C:            float SPAcos(float)
  6464. Machine Language:    d0 = SPAcos(d0)
  6465. Modula-2:        not available
  6466. Arguments:        fnum2 = floating-point number representing the cosine of an
  6467.             angle
  6468. Result:         fnum1 = floating-point value of fnum2 angle in radians
  6469. -------------------------
  6470. SPAdd
  6471. Description:        adds two floating-point numbers
  6472. Library:        mathffp.library
  6473. Offset:         -$0042 (-66)
  6474. Modula-2 Module:    none
  6475. Syntax:         fnum1 = SPAdd(fnum2, fnum3)
  6476. C:            float SPAdd(float, float)
  6477. Machine Language:    d0 = SPAdd(d1, d0)
  6478. Modula-2:        not available
  6479. Arguments:        fnum2 = floating-point number
  6480.             fnum3 = floating-point number
  6481. Result:         fnum1 = fnum2 plus fnum3 in floating-point format
  6482. -------------------------
  6483. SPAsin
  6484. Description:        obtains the arcsine of a floating-point number
  6485. Library:        mathtrans.library
  6486. Offset:         -$0072 (-114)
  6487. Modula-2 Module:    none
  6488. Syntax:         fnum1 = SPAsin(fnum2)
  6489. C:            float SPAsin(float)
  6490. Machine Language:    d0 = SPAsin(d0)
  6491. Modula-2:        not available
  6492. Arguments:        fnum2 = floating-point number representing the sine of an angle
  6493. Result:         fnum1 = floating-point value of fnum2 angle in radians
  6494. -------------------------
  6495. SPAtan
  6496. Description:        obtains the arctangent of a floating-point number
  6497. Library:        mathtrans.library
  6498. Offset:         -$0030 (-48)
  6499. Modula-2 Module:    none
  6500. Syntax:         fnum1 = SPAtan(fnum2)
  6501. C:            float SPAtan(float)
  6502. Machine Language:    d0 = SPAtan(d0)
  6503. Modula-2:        not available
  6504. Arguments:        fnum2 = floating-point number representing the tangent of an
  6505.             angle
  6506. Result:         fnum1 = floating-point value of fnum2 angle in radians
  6507. -------------------------
  6508. SPCmp
  6509. Description:        compares two floating-point numbers
  6510. Library:        mathffp.library
  6511. Offset:         -$002A (-42)
  6512. Modula-2 Module:    none
  6513. Syntax:         flag = SPCmp(fnum1, fnum2)
  6514. C:            long SPCmp(float, float)
  6515. Machine Language:    d0 = SPCmp(d1, d0)
  6516. Modula-2:        not available
  6517. Arguments:        fnum1 = floating-point number
  6518.             fnum2 = floating-point number
  6519. Result:         flag = -1 if fnum1<fnum2; +1 if fnum1>fnum2; 0 if
  6520.             fnum1 = fnum2
  6521. -------------------------
  6522. SPCos
  6523. Description:        obtains the cosine of a floating-point number
  6524. Library:        mathtrans.library
  6525. Offset:         -$002A (-42)
  6526. Modula-2 Module:    none
  6527. Syntax:         fnum1 = SPCos(fnum2)
  6528. C:            float SPCos(float)
  6529. Machine Language:    d0 = SPCos(d0)
  6530. Modula-2:        not available
  6531. Arguments:        fnum2 = floating-point number representing an angle in radians
  6532. Result:         fnum1 = floating-point cosine of fnum2
  6533. -------------------------
  6534. SPCosh
  6535. Description:        obtains the hyperbolic cosine of a floating-point number
  6536. Library:        mathtrans.library
  6537. Offset:         -$0042 (-66)
  6538. Modula-2 Module:    none
  6539. Syntax:         fnum1 = SPCosh(fnum2)
  6540. C:            float SPCosh(float)
  6541. Machine Language:    d0 = SPCosh(d0)
  6542. Modula-2:        not available
  6543. Arguments:        fnum2 = floating-point number representing an angle in radians
  6544. Result:         fnum1 = floating-point hyperbolic cosine of fnum2
  6545. -------------------------
  6546. SPDiv
  6547. Description:        divides one floating-point number by another
  6548. Library:        mathffp.library
  6549. Offset:         -$0054 (-84)
  6550. Modula-2 Module:    none
  6551. Syntax:         fnum1 = SPDiv(fnum2, fnum3)
  6552. C:            float SPDiv(float, float)
  6553. Machine Language:    d0 = SPDiv(d1, d0)
  6554. Modula-2:        not available
  6555. Arguments:        fnum2 = floating-point dividend
  6556.             fnum3 = floating-point divisor
  6557. Result:         fnum1 = floating-point format results of fnum2 divided by fnum3
  6558. -------------------------
  6559. SPExp
  6560. Description:        obtains the exponent of a floating-point number
  6561. Library:        mathtrans.library
  6562. Offset:         -$004E (-78)
  6563. Modula-2 Module:    none
  6564. Syntax:         fnum1 = SPExp(fnum2)
  6565. C:            float SPExp(float)
  6566. Machine Language:    d0 = SPExp(d0)
  6567. Modula-2:        not available
  6568. Arguments:        fnum2 = floating-point number
  6569. Result:         fnum1 = floating-point value representing e (approx. 2.71728)
  6570.             raised to the power of fnum2
  6571. -------------------------
  6572. SPFieee
  6573. Description:        converts a single-precision IEEE number to a Motorola fast float-
  6574.             ing point number
  6575. Library:        mathtrans.library
  6576. Offset:         -$006C (-108)
  6577. Modula-2 Module:    none
  6578. Syntax:         fnum = SPFieee(ieeenum)
  6579. C:            float SPFieee(long)
  6580. Machine Language:    d0 = SPFieee(d0)
  6581. Modula-2:        not available
  6582. Arguments:        ieeenum = single-precision floating-point number
  6583. Result:         fnum = Motorola fast floating point equivalent to fnum
  6584. -------------------------
  6585. SPFlt
  6586. Description:        converts an integer to floating-point number
  6587. Library:        mathffp.library
  6588. Offset:         -$0024 (-36)
  6589. Modula-2 Module:    none
  6590. Syntax:         fnum = SPFlt(inum)
  6591. C:            float SPFlt(long)
  6592. Machine Language:    d0 = SPFlt(d0)
  6593. Modula-2:        not available
  6594. Arguments:        inum = signed integer to be converted
  6595. Result:         fnum = floating-point equivalent to inum
  6596. -------------------------
  6597. SplitCList
  6598. Description:        splits a character list in two, breaking it at the mark (obtained via
  6599.             the MarkList( ) function)
  6600. Library:        clist.library
  6601. Offset:         -008A (-138)
  6602. Modula-2 Module:    none
  6603. Syntax:         tailCList = SplitCList(cList)
  6604. C:            long SplitCList(long)
  6605. Machine Language:    d0 = SplitCList(a0)
  6606. Modula-2:        not available
  6607. Arguments:        cList = character list to split
  6608. Result:         tailCList = new character list that contains the tail end of the
  6609.             original character list; -1 if there is not enough memory
  6610. -------------------------
  6611. SPLog
  6612. Description:        obtains the natural logarithm of a floating-point number
  6613. Library:        mathtrans.library
  6614. Offset:         -$0054 (-84)
  6615. Modula-2 Module:    none
  6616. Syntax:         fnum1 = SPLog(fnum2)
  6617. C:            float SPLog(float)
  6618. Machine Language:    d0 = SPLog(d0)
  6619. Modula-2:        not available
  6620. Arguments:        fnum2 = floating-point number
  6621. Result:         fnum1 = floating-point natural logarithm (base e) of fnum2
  6622. -------------------------
  6623. SPLog10
  6624. Description:        obtains the naparian logarithm (base 10) of a floating-point number
  6625. Library:        mathtrans.library
  6626. Offset:         -$007E (-126)
  6627. Modula-2 Module:    none
  6628. Syntax:         fnum1 = SPLog10(fnum2)
  6629. C:            float SPLoglO(float)
  6630. Machine Language:    d0 = SPLog10(d0)
  6631. Modula-2:      not available
  6632. Arguments:        fnum2 = floating-point number
  6633. Result:         fnum1 = floating-point naparian logarithm (base 10) of fnum2
  6634. -------------------------
  6635. SPMul
  6636. Description:        multiplies one floating-point number by another
  6637. Library:        mathffp.library
  6638. Offset:         -$004E (-78)
  6639. Modula-2 Module:    none
  6640. Syntax:         fnum1 = SPMul(fnum2, fnum3)
  6641. C         float SPMul(float, float)
  6642. Machine Language:    d0 = SPMul(d1, d0)
  6643. Modula-2:        not available
  6644. Arguments:        fnum2 = floating-point number
  6645.             fnum3 = floating-point number
  6646. Result:         fnum1 = product of fnum2 and fnum3 in floating-point format
  6647. -------------------------
  6648. SPNeg
  6649. Description:        negates the value of a floating-point number
  6650. Library:        mathffp.library
  6651. Offset:         -$003C (-60)
  6652. Modula-2 Module:    none
  6653. Syntax:         fnum1 = SPNeg(fnum2)
  6654. C:            float SPNeg(float)
  6655. Machine Language:    d0 = SPNeg(d0)
  6656. Modula-2:        not available
  6657. Arguments:        fnum2 = floating-point number to negate
  6658. Result:         fnum1 = negative fnum2 in floating-point format
  6659. -------------------------
  6660. SPPow
  6661. Description:        obtains the exponentiation of two floating-point numbers
  6662. Library:        mathtrans.library
  6663. Offset:         -$005A (-90)
  6664. Modula-2 Module:    none
  6665. Syntax:         fnum1 = SPPow(fnum2, fnum3)
  6666. C:            float SPPow(float, float)
  6667. Machine Language:    d0 = SPPow(d1, d0)
  6668. Modula-2:        not available
  6669. Arguments:        fnum2 = floating-point number
  6670.             fnum3 = floating-point number
  6671. Result:         fnum1 = floating-point value of fnum2 raised to the power of
  6672.             fnum3
  6673. -------------------------
  6674. sprintf
  6675. Description:        outputs a formatted string into a string (Lattice and Manx users: if
  6676.             you link with lc.lib or c.lib, this is not the function you're calling)
  6677. Library:        amiga.lib (linked library)
  6678. Modula-2 Module:    none
  6679. Syntax:         sprintf(destinationString, formatString, values...)
  6680. C:            void sprintf(char *, char *, long...)
  6681. Machine Language:    move.l #value,-(sp) ;may have several values
  6682.             pea formatString
  6683.             pea destinationString
  6684.             jsr _printf
  6685.             add.l #8,sp ;(2 arguments * 4 bytes = 8)
  6686. Modula-2:        not available
  6687.  
  6688. Arguments:        destinationString = address of string to receive output
  6689.              formatString = string containing optional C formatting commands
  6690.              (%); if you're passing longword values on the stack (as shown
  6691.              above) be sure to follow the percent symbol with a lowercase L
  6692.              values = values or addresses of strings to print; this routine
  6693.              knows how many values are on the stack by checking the number
  6694.              of formatting commands in formatString argument
  6695. Result:          none
  6696. -------------------------
  6697. SPSin
  6698. Description:         obtains the sine of a floating-point number
  6699. Library:         mathtrans.library
  6700. Offset:          -$0024 (-36)
  6701. Modula-2 Module:    none
  6702. Syntax:         fnum1 = SPSin(fnum2)
  6703. C:            float SPSin(float, float)
  6704. Machine Language:    d0 = SPSin(d0)
  6705. Modula-2:         not available
  6706. Arguments:        fnum2 = floating-point number representing an angle in radians
  6707. Result:         fnum1 = floating-point sine of fnum2
  6708. -------------------------
  6709. SPSincos
  6710. Description:         obtains the sine and cosine of a floating-point number
  6711. Library:         mathtrans.library
  6712. Offset:          -$0036 (-54)
  6713. Modula-2 Module:    none
  6714. Syntax:         fnum1 = SPSincos(fnum2, fnum3)
  6715. C:            float SPSincos(float, float *)
  6716. Machine Language:    d0 = SPSincos(d1, d0)
  6717. Modula-2:        not available
  6718. Arguments:        fnum2 = floating-point number
  6719.             fnum3 = pointer to floating point number to receive the cosine of
  6720.             fnum2
  6721. Result:         fnum1 = floating-point sine of fnum2 (cosine is returned in
  6722.             fnum3)
  6723. -------------------------
  6724. SPSinh
  6725. Description:        obtains the hyperbolic sine of a floating-point number
  6726. Library:        mathtrans.library
  6727. Offset:         -$003C (-60)
  6728. Modula-2 Module:    none
  6729. Syntax:         fnum1 = SPSinh(fnum2)
  6730. C:            float SPSinh(float, float)
  6731. Machine Language:    d0 = SPSinh(d0)
  6732. Modula-2:        not available
  6733. Arguments:        fnum2 = floating-point number representing an angle in radians
  6734. Result:         fnum1 = floating-point hyperbolic sine of fnum2
  6735. -------------------------
  6736. SPSqrt
  6737. Description:        obtains the square root of a floating-point number
  6738. Library:        mathtrans.library
  6739. Offset:         -$0060 (-96)
  6740. Modula-2 Module:    none
  6741. Syntax:         fnum1 = SPSqrt(fnum2)
  6742. C:            float SPSqrt(float)
  6743. Machine Language:    d0 = SPSqrt(d0)
  6744. Modula-2:        not available
  6745. Arguments:        fnum2 = floating-point number
  6746. Result:         fnum1 = floating-point square root of fnum2
  6747. -------------------------
  6748. SPSub
  6749. Description:        subtracts one floating-point number from another
  6750. Library:        mathffp.library
  6751. Offset:         -$0048 (-72)
  6752. Modula-2 Module:    none
  6753. Syntax:         fnum1 = SPSub(fnum2, fnum3)
  6754. C:            float SPSub(float, float)
  6755. Machine Language:    d0 = SPSub(d1, d0)
  6756. Modula-2:        not available
  6757. Arguments:        fnum2 = floating-point number
  6758.             fnum3 = floating-point number
  6759. Result:         fnum1 = fnum2 minus fnum3 in floating-point format
  6760. -------------------------
  6761. SPTan
  6762. Description:        obtains the tangent of a floating-point number
  6763. Library:        mathtrans.library
  6764. Offset:         -$0030 (-48)
  6765. Modula-2 Module:    none
  6766. Syntax:         fnum1 = SPTan(fnum2)
  6767. C:            float SPTan(float, float)
  6768. Machine Language:    d0 = SPTan(d0)
  6769. Modula-2:        not available
  6770. Arguments:        fnum2 = floating-point number representing an angle in radians
  6771. Result:         fnum1 = floating-point tangent of fnum2
  6772. -------------------------
  6773. SPTanh
  6774. Description:        obtains the hyperbolic tangent of a floating-point number
  6775. Library:        mathtrans.library
  6776. Offset:         -$0048 (-72)
  6777. Modula-2 Module:    none
  6778. Syntax:         fnum1 = SPTanh(fnum2)
  6779. C:            float SPTanh(float, float)
  6780. Machine Language:    d0 = SPTanh(d0)
  6781. Modula-2:        not available
  6782. Arguments:        fnum2 = floating-point number representing an angle in radians
  6783. Result:         fnum1 = floating-point hyperbolic tangent of fnum2
  6784. -------------------------
  6785. SPTieee
  6786. Description:        converts a Motorola fast floating point number to a single-
  6787.             precision IEEE number
  6788. Library:        mathtrans.library
  6789. Offset:         -$0066 (-102)
  6790. Modula-2 Module:    none
  6791. Syntax:         ieeenum = SPTieee(fnum)
  6792. C:            float SPTieee(float)
  6793. Machine Language:    d0 = SPTieee(d0)
  6794. Modula-2:        not available
  6795. Arguments:        fnum = Motorola fast floating point number
  6796. Result:         ieeenum = single-precision floating-point equivalent to fnum
  6797. -------------------------
  6798. SPTst
  6799. Description:        compares a floating-point number with zero
  6800. Library:        mathffp.library
  6801. Offset:         -$0030 (-48)
  6802. Modula-2 Module:    none
  6803. Syntax:         flag = SPTst(fnum)
  6804. C:            long SPTst(float)
  6805. Machine Language:    d0 = SPTst(d0)
  6806. Modula-2:        not available
  6807. Arguments:        fnum = floating-point number
  6808. Result:         flag = -1 if fnum<0; +1 if fnum>0; 0 if fnum=0
  6809. -------------------------
  6810. SubCList
  6811. Description:        copies a substring from a character list
  6812. Library:        clist.library
  6813. Offset:         -0096 (-150)
  6814. Modula-2 Module:    none
  6815. Syntax:         cList = SubCList(cList, index, length)
  6816. C:            long SubCList(long, long, long)
  6817. Machine Language:    d0 = SubCList(a0, d0, d1)
  6818. Modula-2:        not available
  6819. Arguments:        cList = character list containing substring
  6820.             index = starting position of substring
  6821.             length = number of bytes to copy
  6822. Result:         cList = new character list that contains the substring; -1 if there
  6823.             is not enough memory
  6824. -------------------------
  6825. SUBNUM (macro)
  6826. Description:        extracts the menu subitem number from a value
  6827. C Include File:     include/intuition/intuition.h
  6828. ML Include File:    none
  6829. Modula-2 Module:    Intuition
  6830. Syntax:         subNumber= SUBNUM(menuValue)
  6831. C:            long SUBNUM(long)
  6832. Machine Language:    not available
  6833. Modula-2:        SUBNUM(menuValue: CARDINAL): CARDINAL
  6834. Arguments:        menuValue = 16-bit packed number representing the menu num-
  6835.             ber, item number, and subitem number
  6836. Result:         itemNumber = item number (0-31); equals NOSUB if no menu
  6837.             was selected
  6838. -------------------------
  6839. SumKickData
  6840. Description:        computes the checksum for a Kickstart delta list
  6841. Library:        exec.library
  6842. Offset:         -0264 (-612)
  6843. Modula-2 Module:    Resident
  6844. Syntax:         SumKickData( )
  6845. C:            void SumKickData(void)
  6846. Machine Language:    SumKickData( )
  6847. Modula-2:        SumKickData( )
  6848. Arguments:        none
  6849. Result:         none
  6850. -------------------------
  6851. SumLibrary
  6852. Description:        verifies a library's checksum; alerts user if checksum is incorrect
  6853. Library:        exec.library
  6854. Offset:         -01AA (-426)
  6855. Modula-2 Module:    Libraries
  6856. Syntax:         SumLibrary(library)
  6857. C:            void SumLibrary(struct Library *)
  6858. Machine Language:    SumLibrary(a1)
  6859. Modula-2:        SumLibrary(
  6860. Library:        LibraryPtr)
  6861. Arguments:        library = library to verify
  6862. Result:         none
  6863. -------------------------
  6864. SuperState
  6865. Description:        engage supervisor mode using user-defined stack
  6866. Library:        exec.library
  6867. Offset:         -$0096 (-150)
  6868. Modula-2 Module:    Interrupts
  6869. Syntax:         sysStack = SuperState( )
  6870. C:            long SuperState(void)
  6871. Machine Language:    d0 = SuperState( )
  6872. Modula-2:        SuperState( ): ADDRESS
  6873. Arguments:        none
  6874. Result:         sysStack = pointer to system stack; NULL if already in supervisor
  6875.             mode
  6876. -------------------------
  6877. SwapBitsRastPortClipRect
  6878. Description:        engage supervisor mode using user-defined stack
  6879. Library:        layers.library
  6880. Offset:         -007E (-126)
  6881. Modula-2 Module:    Layers
  6882. Syntax:         SwapBitsRastPortClipRect(rastPort, clipRect)
  6883. C:            void SwapBitsRastPortClipRect(struct RastPort *, struct ClipRect *)
  6884. Machine Language:    SwapBitsRastPortClipRect(a0, a1)
  6885. Modula-2:        SwapBitsRastPortClipRect(rastPort: RastPortPtr; clipRect:
  6886.             ClipRectPtr)
  6887. Arguments:        rastPort = RastPort structure
  6888.             clipRect = ClipRect to swap bits with
  6889. Result:         none
  6890. -------------------------
  6891. SyncSBitMap
  6892. Description:        copies all bits from a layer's ClipRects into the SuperBitMap
  6893. Library:        layers.library
  6894. Offset:         -01BC (-444)
  6895. Modula-2 Module:    Clip
  6896. Syntax:         SyncSBitMap(layer)
  6897. C:            void SyncSBitMap(struct Layer *)
  6898. Machine Language:    SyncSBitMap(a0)
  6899. Modula-2:        SyncSBitMap(layer: LayerPtr)
  6900. Arguments:        layer = a locked layer that contains a SuperBitMap
  6901. Result:         none
  6902. -------------------------
  6903. Text
  6904. Description:        prints text in a RastPort using the current font
  6905. Library:        graphics.library
  6906. Offset:         -$003C (-60)
  6907. Modula-2 Module:    Text
  6908. Syntax:         Text(rastPort, string, length)
  6909. C:            void Text(struct RastPort *, char *, long)
  6910. Machine Language:    Text(a1, a0, d0)
  6911. Modula-2:        Text(rastPort: RastPortPtr; string: STRPTR; length: CARDINAL)
  6912. Arguments:        rastPort = RastPort where text is to be output
  6913.             string = text to print
  6914.             length = number of characters in string
  6915. Result:         none
  6916. -------------------------
  6917. Textlength
  6918. Description:        finds the length (in bits) that a string of characters would occupy
  6919.             if printed to a RastPort using the current text font
  6920. Library:        graphics.library
  6921. Offset:         -$0036 (-54)
  6922. Modula-2 Module:    Text
  6923. Syntax:         size = TextLength(rastPort, string, length)
  6924. C:            long TextLength(struct RastPort *, char *, long)
  6925. Machine Language:    d0 = TextLength(a1, a0, d0)
  6926. Modula-2:        TextLength(rastPort: RastPortPtr; string: STRPTR; length: CARDI-
  6927.             NAL): CARDINAL
  6928. Arguments:        rastPort = RastPort where text would be output
  6929.             string = text to print
  6930.             length = number of characters in string
  6931. Result:         size = number of pixels (horizontally) required to print the speci-
  6932.             fied text
  6933. -------------------------
  6934. ThinLayerInfo
  6935. Description:        converts a 1.1 LayerInfo structure into a 1.0 LayerInfo structure,
  6936.             thus returning the extra memory allocate by FattenLayerInfo (this
  6937.             is an obsolete function)
  6938. Library:        layers.library
  6939. Offset:         -$00A2 (-162)
  6940. Modula-2 Module:    none
  6941. Syntax:         ThinLayerInfo(layerInfo)
  6942. C:            void ThinLayerInfo(struct Layer_Info *)
  6943. Machine Language:    ThinLayerInfo(a0)
  6944. Modula-2:        not available
  6945. Arguments:        layerInfo = LayerInfo structure to convert
  6946. Result:         none
  6947. -------------------------
  6948. Translate
  6949. Description:        converts an English string into phonetics
  6950. Library:        translator.library
  6951. Offset:         -$001E (-30)
  6952. Modula-2 Module:    Translator
  6953. Syntax:         error = Translate(instring, inlen, outbuf, outlen)
  6954. C:            long Translate(char *, long, char *, long)
  6955. Machine Language:    d0 = Translate(a1, d0, a1, d1)
  6956. Modula-2:        Translate(instring: STRPTR; inlen: LONGCARD; outbuf: STRPTR;
  6957.             outlen: LONGCARD): LONGINT
  6958. Arguments:        instring = English string to convert
  6959.             inlen = number of characters in instring
  6960.             outbuf = buffer to hold phonetic codes
  6961.             outlen = size of outbuf in bytes
  6962. Result:         error = 0 if successful; negative number representing position in
  6963.             instring where function was forced to stop because the output
  6964.             buffer overflowed
  6965. -------------------------
  6966. TypeOfMem
  6967. Description:        determines the attributes of a given memory address
  6968. Library:        exec.library
  6969. Offset:         -$0216 (-534)
  6970. Modula-2 Module:    Memory
  6971. Syntax:         attributes = TypeOfMem(address)
  6972. C:            long TypeOfMem(void *)
  6973. Machine Language:    d0 = TypeOfMem(a0)
  6974. Modula-2:        TypeOfMem(address: ADDRESS): MemReqSet
  6975. Arguments:        address = memory address
  6976. Result:         attributes = type of memory-MEMF_CHIP, MEMF_FAST,
  6977.             MEMF_PUBLIC
  6978. -------------------------
  6979. UnGetCLChar
  6980. Description:        adds a byte to the beginning of a character list
  6981. Library:        clist.library
  6982. Offset:         -$0048 (-72)
  6983. Modula-2 Module:    none
  6984. Syntax:         error = UnGetCLChar(cList, byte)
  6985. C:            long UnGetCLChar(long, long)
  6986. Machine Language:    d0 = UnGetCLChar(a0, d0)
  6987. Modula-2:        not available
  6988. Arguments:        cList = character list descriptor, as returned by AllocCList( ) or
  6989.             StrToCL( )
  6990.             byte = byte to add to beginning of character list
  6991. Result:         error = 0 if successful
  6992. -------------------------
  6993. UnGetCLWord
  6994. Description:        adds a word to the beginning of a character list
  6995. Library:        clist.library
  6996. Offset:         -$0060 (-96)
  6997. Modula-2 Module:    none
  6998. Syntax:         error = UnGetCLWord(cList, word)
  6999. C:            long UnGetCLWord(long, long)
  7000. Machine Language:    d0 = UnGetCLWord(a0, d0)
  7001. Modula-2:        not available
  7002. Arguments:        cList = character list descriptor, as returned by AllocCList( ) or
  7003.             StrToCL( )
  7004.             word = word to add to beginning of character list
  7005. Result:         error = 0 if successful; 1 if unsuccessful
  7006. -------------------------
  7007. UnLoadSeg
  7008. Description:        removes a segment from memory
  7009. Library:        dos.library
  7010. Offset:         -$009C (-156)
  7011. Modula-2 Module:    DOSLoader
  7012. Syntax:         UnLoadSeg(segment)
  7013. C:            void UnLoadSeg(BPTR)
  7014. Machine Language:    UnLoadSeg(d1)
  7015. Modula-2:        UnLoadSeg(segment: BPTR): BOOLEAN
  7016. Arguments:        segment = BCPL pointer to a segment as returned by LoadSeg( )
  7017. Result:         none
  7018. -------------------------
  7019. UnLock
  7020. Description:        unlocks a directory or file
  7021. Library:        dos.library
  7022. Offset:         -$005A (-90)
  7023. Modula-2 Module:    DOS
  7024. Syntax:         UnLock(lock)
  7025. C:            void UnLock(BPTR)
  7026. Machine Language:    UnLock(d1)
  7027. Modula-2:        UnLock(lock: FileLock)
  7028. Arguments:        lock = BCPL pointer to a lock
  7029. Result:         none
  7030. -------------------------
  7031. UnlockIBase
  7032. Description:        releases the lock on IntuitionBase so Intuition can change the
  7033.             structure as it pleases
  7034. Library:        intuition.library
  7035. Offset:         -$01A4 (-420)
  7036. Modula-2 Module:    IntuitionBase
  7037. Syntax:         UnLockIBase(lockNumber)
  7038. C:            void UnLockIBase(long)
  7039. Machine Language:    UnLockIBase(a0)
  7040. Modula-2:        UnLockIBase(lockNumber: LONGCARD)
  7041. Arguments:        lockNumber = Intuition lock value as returned by LockIBase( )
  7042. Result:         none
  7043. -------------------------
  7044. UnlockLayer
  7045. Description:        unlocks a Layer so the graphics routines can use it
  7046. Library:        layers.library
  7047. Offset:         -$0066 (-102)
  7048. Modula-2 Module:    Layers
  7049. Syntax:         UnLockLayer(layer)
  7050. C:            void UnLockLayer(struct Layer *)
  7051. Machine Language:    UnLockLayer(a0)
  7052. Modula-2:        UnLockLayer(layer: LayerPtr)
  7053. Arguments:        layer = Layer structure to unlock
  7054. Result:         none
  7055. -------------------------
  7056. UnlockLayerInfo
  7057. Description:        unlocks a Layer_Info structure
  7058. Library:        layers.library
  7059. Offset:         -$008A (-138)
  7060. Modula-2 Module:    Layers
  7061. Syntax:         UnlockLayerInfo(layerlnfo)
  7062. C:            void UnlockLayerInfo(struct Layer_Info *)
  7063. Machine Language:    UnlockLayerInfo(a0, a1)
  7064. Modula-2:        UnlockLayerInfo(layerlnfo: LayerlnfoPtr)
  7065. Arguments:        layerlnfo = Layer_Info structure to unlock
  7066. Result:         none
  7067. -------------------------
  7068. UnlockLayerRom
  7069. Description:        unlocks a Layer so the graphics routines can use it (this function
  7070.             uses ROM code as opposed to LockLayerRom( )'s RAM-based
  7071.             code)
  7072. Library:        graphics.library
  7073. Offset:         -$01B6 (-438)
  7074. Modula-2 Module:    RomLayers
  7075. Syntax:         UnLockLayerRom(layer)
  7076. C:            void UnLockLayerRom(struct Layer *)
  7077. Machine Language:    UnLockLayerRom(a5)
  7078. Modula-2:        UnLockLayerRom(layer: LayerPtr)
  7079. Arguments:        layer = Layer structure to unlock
  7080. Result:         none
  7081. -------------------------
  7082. UnlockLayers
  7083. Description:        unlocks all layers so the graphics routines can use them
  7084. Library:        layers.library
  7085. Offset:         -$0072 (-114)
  7086. Modula-2 Module:    Layers
  7087. Syntax:         UnLockLayers(layerInfo)
  7088. C:            void UnLockLayers(struct Layer_Info *)
  7089. Machine Language:    UnLockLayers(a0)
  7090. Modula-2:        UnLockLayers(layerInfo: LayerInfoPtr)
  7091. Arguments:        layerInfo = Layer_Info structure
  7092. Result:         none
  7093. -------------------------
  7094. UnPutCLChar
  7095. Description:        gets a byte from the end of a character list
  7096. Library:        clist.library
  7097. Offset:         -$0048 (-72)
  7098. Modula-2 Module:    none
  7099. Syntax:         byte= UnPutCLChar(cList)
  7100. C:            long UnPutCLChar(long)
  7101. Machine Language:    d0 = UnPutCLChar(a0)
  7102. Modula-2:        not available
  7103. Arguments:        cList = character list descriptor, as returned by AllocCList( ) or
  7104.             StrToCL( )
  7105. Result:         byte = byte from end of character list; -1 no data
  7106. -------------------------
  7107. UnPutCLWord
  7108. Description:        gets a word from the end of a character list
  7109. Library:        clist.library
  7110. Offset:         -$0066 (-102)
  7111. Modula-2 Module:    none
  7112. Syntax:         word = UnPutCLWord(cList)
  7113. C:            long UnPutCLWord(long)
  7114. Machine Language:    d0 = UnPutCLWord(a0)
  7115. Modula-2:        not available
  7116. Arguments:        cList = character list descriptor, as returned by AllocCList( ) or
  7117.             StrToCL( )
  7118. Result:         word = word from end of character list; -1 if no data
  7119. -------------------------
  7120. UpFrontLayer
  7121. Description:        moves a layer in front of all other layers
  7122. Library:        layers.library
  7123. Offset:         -$0030 (-48)
  7124. Modula-2 Module:    Layers
  7125. Syntax:         success = UpFrontLayer(dummy, layer)
  7126. C:            long UpFrontLayer(struct Layer_Info *, struct Layer *)
  7127. Machine Language:    d0 = UpFrontLayer(a0, a1)
  7128. Modula-2:        UpfrontLayer(layer: LayerPtr): BOOLEAN
  7129. Arguments:        dummy = unused
  7130.             layer = pointer to Layer to move behind other layers
  7131. Result:         success = TRUE if successful; FALSE if unsuccessful
  7132. -------------------------
  7133. UserState
  7134. Description:        return to user state and system stack (do NOT call if computer is
  7135.             already in user state)
  7136. Library:        exec.library
  7137. Offset:         -009C (-156)
  7138. Modula-2 Module:    Interrupts
  7139. Syntax:         UserState(sysStack)
  7140. C:            void UserState(char *)
  7141. Machine Language:    UserState(d0)
  7142. Modula-2:        UserState(sysStack: ADDRESS)
  7143. Arguments:        sysStack = system stack pointer as returned by SuperState( )
  7144. Result:         none
  7145. -------------------------
  7146. Vacate
  7147. Description:        releases a semaphore locked by Procure( )
  7148. Library:        exec.library
  7149. Offset:         -$0222 (-546)
  7150. Modula-2 Module:    Semaphores
  7151. Syntax:         Vacate(semaphore)
  7152. C:            void Vacate(struct Semaphore *)
  7153. Machine Language:    Vacate(a0)
  7154. Modula-2:        Vacate(semaphore: SemaphorePtr)
  7155. Arguments:        semaphore = Semaphore structure to release
  7156. Result:         none
  7157. -------------------------
  7158. VBeamPos
  7159. Description:        returns the current position of the vertical video beam
  7160. Library:        graphics.library
  7161. Offset:         -$0180 (-384)
  7162. Modula-2 Module:    Views
  7163. Syntax:         pos = VBeamPos( )
  7164. C:            long VBeamPos(void)
  7165. Machine Language:    d0 = VBeamPos( )
  7166. Modula-2:        VBeamPos( ): CARDINAL
  7167. Arguments:        none
  7168. Result:         pos = current beam position (0-511)
  7169. -------------------------
  7170. ViewAddress
  7171. Description:        returns the address of Intuition's View structure
  7172. Library:        intuition.library
  7173. Offset:         -$0126 (-294)
  7174. Modula-2 Module:    Intuition
  7175. Syntax:         view = ViewAddress( )
  7176. C:            struct View *ViewAddress(void)
  7177. Machine Language:    d0 = ViewAddress( )
  7178. Modula-2:        ViewAddress( ): ViewPtr
  7179. Arguments:        none
  7180. Result:         view = address of the Intuition View structure
  7181. -------------------------
  7182. ViewPortAddress
  7183. Description:        returns the address of a window's ViewPort structure
  7184. Library:        intuition.library
  7185. Offset:         -$012C (-300)
  7186. Modula-2 Module:    Intuition
  7187. Syntax:         viewPort = ViewPortAddress(window)
  7188. C:            struct ViewPort *ViewPortAddress(struct Window *)
  7189. Machine Language:    d0 = ViewPortAddress(a0)
  7190. Modula-2:        ViewPortAddress(window: WindowPtr): ViewPortPtr
  7191. Arguments:        window = Window structure
  7192. Result:         viewPort = address of window's ViewPort structure
  7193. -------------------------
  7194. Wait
  7195. Description:        waits for one or more signals
  7196. Library:        exec.library
  7197. Offset:         -$013E (-318)
  7198. Modula-2 Module:    Tasks
  7199. Syntax:         signals = Wait(signalSet)
  7200. C:            long Wait(long)
  7201. Machine Language:    d0 = Wait(d0)
  7202. Modula-2:        Wait(signalSet: SignalSet): SignalSet
  7203. Arguments:        signalSet = set of signals to wait for
  7204. Result:         signals = signals that have occurred
  7205. -------------------------
  7206. WaitBlit
  7207. Description:        waits for the blitter to finish what it's doing
  7208. Library:        graphics.library
  7209. Offset:         -$00E4 (-228)
  7210. Modula-2 Module:    Blitter
  7211. Syntax:         WaitBlit( )
  7212. C:            void WaitBlit(void)
  7213. Machine Language:    WaitBlit( )
  7214. Modula-2:        WaitBlit( )
  7215. Arguments:        none
  7216. Result:         none
  7217. -------------------------
  7218. WaitBOVP
  7219. Description:        waits for the vertical beam to reach the bottom of a ViewPort
  7220. Library:        graphics.library
  7221. Offset:         -$0192 (-402)
  7222. Modula-2 Module:    Views
  7223. Syntax:         WaitBOVP(viewPort)
  7224. C:            void WaitBOVP(struct ViewPort *)
  7225. Machine Language:    WaitBOVP(a0)
  7226. Modula-2:        WaitBOVP(viewPort: ViewPortPtr)
  7227. Arguments:        viewPort = ViewPort structure
  7228. Result:         none
  7229. -------------------------
  7230. WaitForChar
  7231. Description:        waits a specified amount of time for a character to become avail-
  7232.             able from a virtual terminal
  7233. Library:        dos.library
  7234. Offset:         -$00CC (-204)
  7235. Modula-2 Module:    DOS
  7236. Syntax:         avail = WaitForChar(file, timeout)
  7237. C:            long WaitForChar(BPTR, long)
  7238. Machine Language:    d0 = WaitForChar(d1, d2)
  7239. Modula-2:        WaitForChar(file: FileHandle; timeout: LONGINT): BOOLEAN
  7240. Arguments:        file = BCPL pointer to a file handle
  7241.             timeout = number of microseconds to wait for character
  7242. Result:         avail = TRUE if a character is available
  7243. -------------------------
  7244. WaitIO
  7245. Description:        waits for an I/O request to be executed
  7246. Library:        exec.library
  7247. Offset:         -$01DA (-474)
  7248. Modula-2 Module:    IO
  7249. Syntax:         error = WaitIO(ioRequest)
  7250. C:            long WaitIO(struct IORequest *)
  7251. Machine Language:    d0 = WaitIO(a1)
  7252. Modula-2:        WaitIO(ioRequest: ADDRESS): INTEGER
  7253. Arguments:        ioRequest = IORequest block
  7254. Result:         error = 0 if successful
  7255. -------------------------
  7256. WaitPort
  7257. Description:        waits for a message
  7258. Library:        exec.library
  7259. Offset:         -$0180 (-384)
  7260. Modula-2 Module:    Ports
  7261. Syntax:         message = WaitPort(port)
  7262. C:            struct Message *WaitPort(struct MsgPort *)
  7263. Machine Language:    d0 = WaitPort(a0)
  7264. Modula-2:        WaitPort(port: MsgPortPtr): ADDRESS
  7265. Arguments:        port = message port to receive message
  7266. Result:         message = pointer to first available message
  7267. -------------------------
  7268. WaitTOF
  7269. Description:        waits for the next vertical blank
  7270. Library:        graphics.library
  7271. Offset:         -$010E (-270)
  7272. Modula-2 Module:    Views
  7273. Syntax:         WaitTOF( )
  7274. C:            void WaitTOF(void)
  7275. Machine Language:    WaitTOF( )
  7276. Modula-2:        WaitTOF( )
  7277. Arguments:        none
  7278. Result:         none
  7279. -------------------------
  7280. WBenchToBack
  7281. Description:        moves the Workbench screen behind all other screens
  7282. Library:        intuition.library
  7283. Offset:         -$0150 (-336)
  7284. Modula-2 Module:    Intuition
  7285. Syntax:         success = WBenchToBack( )
  7286. C:            long WBenchToBack(void)
  7287. Machine Language:    d0 = WBenchToBack( )
  7288. Modula-2:        WBenchToBack( ): BOOLEAN
  7289. Arguments:        none
  7290. Result:         success = TRUE if Workbench screen is open
  7291. -------------------------
  7292. WBenchToFront
  7293. Description:        moves the Workbench screen in front of all other screens
  7294. Library:        intuition.library
  7295. Offset:         -$0156 (-342)
  7296. Modula-2 Module:    Intuition
  7297. Syntax:         success = WBenchToFront( )
  7298. C:            long WBenchToFront(void)
  7299. Machine Language:    d0 = WBenchToFront( )
  7300. Modula-2:        WBenchToFront( ): BOOLEAN
  7301. Arguments:        none
  7302. Result:         success = TRUE if Workbench screen is open
  7303. -------------------------
  7304. WhichLayer
  7305. Description:        finds the layer which contains the specified point
  7306. Library:        layers.library
  7307. Offset:         -$0084 (-132)
  7308. Modula-2 Module:    Layers
  7309. Syntax:         layer = WhichLayer(layerlnfo, x, y)
  7310. C:            struct Layer *WhichLayer(struct Layer_Info *, long, long)
  7311. Machine Language:    d0 = WhichLayer(a0, d0, d1)
  7312. Modula-2:        WhichLayer(layerlnfo: LayerlnfoPtr; x, y: LONGCARD): LayerPtr
  7313. Arguments:        layerlnfo = Layerlnfo structure
  7314.             x = horizontal coordinate of point
  7315.             y = vertical coordinate of point
  7316. Result:         layer = pointer to top-most layer containing this point; NULL if
  7317.             point is not in a layer
  7318. -------------------------
  7319. WindowLimits
  7320. Description:        sets the minimum and maximum size of a window
  7321. Library:        intuition.library
  7322. Offset:         -$013E (-318)
  7323. Modula-2 Module:    Intuition
  7324. Syntax:         success = WindowLimits(window, minWidth, minHeight,
  7325.             maxWidth, minHeight)
  7326. C:            long WindowLimits(struct Window *, long, long, long, long)
  7327. Machine Language:    d0 = WindowLimits(a0, d0, d1, d2, d3)
  7328. Modula-2:        WindowLimits(window: WindowPtr; minWidth, minHeight,
  7329.             maxWidth, maxHeight: LONGINT): BOOLEAN
  7330. Arguments:        window = window to set size limits for
  7331.             minWidth = window's new minimum width
  7332.             minHeight = window's new minimum height
  7333.             maxWidth = window's new maximum width
  7334.             maxHeight = window's new minimum height
  7335. Result:         success = TRUE if all limits are set; FALSE if any of the limits are
  7336.             out of range, in which case only the legal limits are set
  7337. -------------------------
  7338. WindowToBack
  7339. Description:        moves a window to the back of all other windows
  7340. Library:        intuition.library
  7341. Offset:         -$0132 (-306)
  7342. Modula-2 Module:    Intuition
  7343. Syntax:         WindowToBack(window)
  7344. C:            void WindowToBack(struct Window *)
  7345. Machine Language:    WindowToBack(a0)
  7346. Modula-2:        WindowToBack(window: WindowPtr)
  7347. Arguments:        window = window to move to back of display
  7348. Result:         none
  7349. -------------------------
  7350. WindowToFront
  7351. Description:        moves a window in front of all other windows
  7352. Library:        intuition.library
  7353. Offset:         -$0138 (-312)
  7354. Modula-2 Module:    Intuition
  7355. Syntax:         WindowToFront(window)
  7356. C:            void WindowToFront(struct Window *)
  7357. Machine Language:    WindowToFront(a0)
  7358. Modula-2:        WindowToFront(window: WindowPtr)
  7359. Arguments:        window = window to move to front of display
  7360. Result:         none
  7361. -------------------------
  7362. Write
  7363. Description:        writes bytes of data to a file
  7364. Library:        dos.library
  7365. Offset:         -$0030 (-48)
  7366. Modula-2 Module:    DOS
  7367. Syntax:         length = Write(file, buffer, length)
  7368. C:            long Write(BPTR, char *, long)
  7369. Machine Language:    d0 = Write(d1, d2, d3)
  7370. Modula-2:        Write(file: FileHandle; buffer: ADDRESS; length: LONGINT):
  7371.             LONGINT
  7372. Arguments:        file = BCPL pointer to a file handle
  7373.             buffer = pointer to start of buffer containing data to write
  7374.             length = number of bytes to write
  7375. Result:         length = number of bytes successfully written; -1 if error
  7376.             occurred
  7377. -------------------------
  7378. WriteExpansionByte
  7379. Description:        writes a byte to a new-style memory expansion board-nybble by
  7380.             nybble
  7381. Library:        expansion.library
  7382. Offset:         -$0072 (-114)
  7383. Modula-2 Module:    Expansion
  7384. Syntax:         error = WriteExpansionByte(board, offset, byte)
  7385. C:            long WriteExpansionByte(long, long, long)
  7386. Machine Language:    d0 = WriteExpansionByte(a0, d0, d1)
  7387. Modula-2:        WriteExpansionByte(board: ADDRESS; offset: LONGCARD; byte:
  7388.             BYTE): BOOLEAN
  7389. Arguments:        board = base of a new-style expansion board
  7390.             offset = logical offset from the configdev base
  7391.             byte = byte to write to board
  7392. Result:         error = 0 if successful
  7393. -------------------------
  7394. WritePixel
  7395. Description:        colors a single pixel with the current foreground drawing pen
  7396. Library:        graphics.library
  7397. Offset:         -$0144 (-324)
  7398. Modula-2 Module:    Pens
  7399. Syntax:         error = WritePixel(rastPort, x, y)
  7400. C:            long WritePixel(struct RastPort *, long, long)
  7401. Machine Language:    d0 = WritePixel(a1, d0, d1 )
  7402. Modula-2:        WritePixel(rastPort: RastPortPtr; x, y: INTEGER): INTEGER
  7403. Arguments:        rastPort = RastPort structure containing pixel to color
  7404.             x = horizontal coordinate of pixel
  7405.             y = vertical coordinate of pixel
  7406. Result:         error = 0 if successful; -1 if pixel is outside specified RastPort
  7407. -------------------------
  7408. XorRectRegion
  7409. Description:        performs a 2d XOR operation of a rectangle with a region, leaving
  7410.             the results in the region
  7411. Library:        graphics.library
  7412. Offset:         -$022E (-558)
  7413. Modula-2 Module:    Regions
  7414. Syntax:         status = XorRectRegion(region, rectangle)
  7415. C:            long XorRectRegion(struct Region *, struct Rectangle *)
  7416. Machine Language:    d0 = XorRectRegion(a0, a1)
  7417. Modula-2:        XorRectRegion(region: RegionPtr; rectangle: RectanglePtr):
  7418.             BOOLEAN
  7419. Arguments:        region = Region structure
  7420.             rectangle = Rectangle structure
  7421. Result:         status = TRUE if successful; FALSE if out of memory
  7422. -------------------------
  7423. XorRegionRegion
  7424. Description:        performs a 2d XOR operation of one region with a second region,
  7425.             leaving the results in the second region
  7426. Library:        graphics.library
  7427. Offset:         -$026A (-618)
  7428. Modula-2 Module:    Regions
  7429. Syntax:         status = XorRegionRegion(region1, region2)
  7430. C:            long XorRegionRegion(struct Region *, struct Region *)
  7431. Machine Language:    d0 = XorRegionRegion(a0, a1)
  7432. Modula-2:        XorRegionRegion(region1, region2: RegionPtr): BOOLEAN
  7433. Arguments:        region1 = Region structure
  7434.             region2 = Region structure
  7435. Result:         status = TRUE if successful; FALSE if out of memory
  7436. -------------------------
  7437. Amiga Hardware Registers
  7438.  
  7439. The Amiga's hardware is accessed via registers- locations within a chip
  7440. that control it's operation or return status information about the chip.  A
  7441. register is accessed by R/W operations just like RAM.
  7442.  
  7443. Warning: You should never attempt to read a write-only register.  Doing so
  7444. will place a random value in that register and possibly cause a lockup.  For
  7445. the same reason, never use BCLR or BSET on a write-only register as these
  7446. two instructions perform a read prior to clearing or setting the specified
  7447. bit.  Write-only registers will be annotated with a (*W), and read-only
  7448. registers with a (*R) in the Status header.  A third type of register is a
  7449. Strobe register.  These are used by the Amiga to signify that an event has
  7450. occurred.  You should NEVER READ OR WRITE to a strobe register as the
  7451. operation may falsely trigger the strobe and confuse the Amiga.
  7452.  
  7453. SET/CLR Bit: Some registers contain a bit labeled "SET/CLR".  This is a
  7454. special bit that allows you to set or clear the register's other bits
  7455. without using AND or OR.  SET/CLR will always be bit 15.  What happens to a
  7456. register that contains a SET/CLR bit depends on the way you set this bit.
  7457. If it is set to zero, any other bit that is written to with a one will be
  7458. cleared.  If bit 15 is set to one, any other bit that is written to with a
  7459. one will be set to one.  All bits written to with a zero remain unaffected.
  7460. So, to clear all the bits, use $7FFF.  To set all bits, use $FFFF.  The
  7461. SET/CLR bit is useful ONLY on write-only registers.  On read only registers,
  7462. this bit always returns a value of zero.
  7463.  
  7464. Now that you realize how the bit operations work, here are the custon chip
  7465. register addresses and explanations:
  7466.  
  7467. ----------------------------------------------------------------------------
  7468. $DFF000 BLTDDAT      Blitter Destination Data (early read dummy address)
  7469. Status: DMA Only     Agnus
  7470.              Just before a word of data is moved into RAM by the
  7471.              blitter, it's stored here.  This register cannot be
  7472.              accessed by the 68K or the copper.  It's used
  7473.              exclusively by the blitter DMA.  Writing to it does
  7474.              nothing.  Reading returns a seemingly random number
  7475. ----------------------------------------------------------------------------
  7476. $DFF002 DMACONR      DMA Enable Read
  7477. Status: *R         Agnus/Paula
  7478.              0    AUD0EN     1 = Audio channel 0 DMA enabled
  7479.              1    AUD1EN
  7480.              2    AUD2EN
  7481.              3    AUD3EN
  7482.              4    DSKEN     1 = Disk DMA enabled
  7483.              5    SPREN     1 = Sprite DMA enabled
  7484.              6    BLTEN     1 = Blitter DMA enabled
  7485.              7    COPEN     1 = Copper DMA enabled
  7486.              8    BPLEN     1 = Bit-plane DMA enabled
  7487.              9    DMAEN     0 = DMA for all channels disabled
  7488.              10 BLTPRI     1 = Blitter has full priority over 68K
  7489.                  0 = Blitter has partial priority
  7490.              11 UNUSED
  7491.              12 UNUSED
  7492.              13 BZERO     1 = If the last blitter operation output
  7493.                      zeroes only.  No bits were set in
  7494.                      destination RAM.
  7495.              14 BBUSY     1 = Blitter is busy ("blitting") See note
  7496.              15 SETCLR     UNUSED
  7497.  
  7498. Note: Because of timing problems with 68020/68030 processors, you must wait
  7499. a short while before testing BBUSY.  A "btst #14,DMACONR" before the test
  7500. will provide the appropriate delay.  (i.e.: BTST twice)
  7501. ----------------------------------------------------------------------------
  7502. $DFF004 VPOSR         Vertical Beam Position Read
  7503. Status: *R         Agnus
  7504.              0    V8     The high bit of the vertical beam position
  7505.                  (1 = pos > 255)
  7506.           1-14    UNUSED
  7507.             15    LOF     Interlace Long Frame Flag (1 = a long frame
  7508.                  is being drawn (even), 0 = a short frame
  7509.                  (odd))
  7510.  
  7511. ----------------------------------------------------------------------------
  7512. $DFF006 VHPOSR         Vertical/Horizontal Beam Position Read
  7513. Status: *R         Agnus
  7514.            0-7    H1-H8     Video beam's horizontal position in
  7515.                  increments of two lo-res pixels
  7516.           8-15    V0-V7     Low 8 bits of video beam's horizontal pos
  7517.  
  7518. Note: If bit 3 in register BPLCON0 ($DFF100) is set, the Amiga returns the
  7519. light pen position and NOT the raster position!  Also, the location and size
  7520. of the visible screen area changes accordingly with the DIWSTRT and DIWSTOP
  7521. (Display Window Start/Stop @ $DFF08E / $DFF090).  These registers are
  7522. changed by Preferences each time you adjust the display-centering gadget.
  7523. Normal Visible Screen area is - horizontal : $40 - $E0
  7524.                   vertical : $2C - $F4
  7525. ----------------------------------------------------------------------------
  7526. $DFF008 DSKDATR      Disk Data Read (early read dummy address -Disk DMA)
  7527.              SEE $DFF000 (BLTDDAT) for explanation.
  7528. ----------------------------------------------------------------------------
  7529. $DFF00A JOY0DAT      Joystick/Mouse Port 0 Data
  7530. $DFF00C JOY1DAT             Port 1 Data
  7531. Status: *R        Denise
  7532.              For Mouse Use:
  7533.            0-7         Horizontal Position Counter
  7534.           8-15         Vertical Position Counter
  7535.              For Joystick Use:
  7536.              0 EOR BIT 1 Down (1 = stick down)
  7537.              1         Right(1 = stick right)
  7538.              8 EOR BIT 9 Up   (1 = stick up)
  7539.              9         Left (1 = stick left)
  7540.              For Paddle Use:
  7541.              1         Right paddle fire button (1 = fire)
  7542.              9         Left paddle fire button  (1 = fire)
  7543. ----------------------------------------------------------------------------
  7544. $DFF00E CLXDAT         Collision Data
  7545. Status: *R         Denise
  7546. if set to one...     0    Even bit plane collided with odd bit plane
  7547.              1    Odd plane collided with sprite 0 or 1
  7548.              2               with sprite 2 or 3
  7549.              3                       4 or 5
  7550.              4                       6 or 7
  7551.              5    Even plane collide with sprite 0 or 1
  7552.              6                       2 or 3
  7553.              7                       4 or 5
  7554.              8                       6 or 7
  7555.              9    Sprite 0 or 1 collide with 2 or 3
  7556.             10           0 or 1           4 or 5
  7557.             11           0 or 1           6 or 7
  7558.             12           2 or 3           4 or 5
  7559.             13           2 or 3           6 or 7
  7560.             14           4 or 5           6 or 7
  7561.             15    UNUSED
  7562.  
  7563. Note: When you read this register, all bits are cleared, so be sure to save
  7564. it if you need it's contents if you want to check for more than one type of
  7565. collision.  Bitplane collisions are extremely flexible.  See CLXCON
  7566. ($DFF098) for more info.D
  7567. ----------------------------------------------------------------------------
  7568. $DFF010 ADKCONR      Audio/Disk Control Read
  7569. Status: *R         Paula
  7570.              0 ATVOL0 1 = Audio channel 0 modulates channel 1 volume
  7571.              1 ATVOL1 1 =        1            2
  7572.              2 ATVOL2 1 =        2            3
  7573.              3 ATVOL3 1 = Output of audio channel 3 disabled
  7574.              4 ATPER0 1 = Audio channel 0 modulates channel 1 period
  7575.              5 ATPER1 1 =        1            2
  7576.              6 ATPER2 1 =        2            3
  7577.              7 ATPER3 1 = Output of audio channel 3 disabled
  7578.              8 FAST   1 = MFM:2 us per bit disk operation (normDOS)
  7579.                   0 = GCR:4 us per bit disk op (double density)
  7580.              9 MSBSYNC      1 = GCR-format synchronization for disk
  7581.                       operations enabled (not used by DOS)
  7582.             10 WORDSYNC   1 = Disk Controller is synchronizing on
  7583.                       the data word found in the DSKSYNC
  7584.                       register ($DFF07E) typically set to
  7585.                       $4489 for MFM.
  7586.             11 UARTBRK      1 = RS232 break-signal is occuring on the
  7587.                       serial TxD line.
  7588.             12 MFMPREC      1 = MFM selected
  7589.                   0 = GCR selected
  7590.          13-14 PRECOMP      Disk precompensation time (00=none,
  7591.                   01=140 nsec, 10=280 nsec, 11=560 nsec)
  7592.             15 SETCLR      UNUSED
  7593.  
  7594. Note: ADKCONR is a read version of ADKCON ($DFF09E).  See that register for
  7595. a complete explanation of each bit.
  7596. ----------------------------------------------------------------------------
  7597. $DFF012 POT0DAT      Pot (Paddle/Proportional Joystick) Port 0/1 Data Read
  7598. $DFF014 POT1DAT
  7599. Status: *R         Paula
  7600.                For Paddle Use:
  7601.            0-7 Left Paddle Counter (0 = completely CCW)
  7602.           8-15 Right Paddle Counter(0 = completely CCW)
  7603.                For Proportional Joystick Use:
  7604.            0-7 Horizontal Counter (0 = stick pushed left)
  7605.           8-15 Vertical Counter   (0 = stick pushed down)
  7606. ----------------------------------------------------------------------------
  7607. $DFF016 POTGOR         Pot Port Data Read
  7608. Status: *R         Paula
  7609.              0 START  Trigger bit for starting pot counters
  7610.                   (always reads zero)
  7611.            1-7 UNUSED Reserved for Chip ID
  7612.              8 DATLX  Current state of pin 9 on game port 1 (0/1)
  7613.              9 OUTLX  Output enable for pin 9 on game port 1 (zero)
  7614.             10 DATLY  Current state of pin 5 on game port 1 (0/1)
  7615.             11 OUTLY  Output enable for pin 5 on game port 1 (zero)
  7616.             12 DTARX  Current state of pin 9 on game port 0 (0/1)
  7617.             13 OUTRX  Output enable for pin 9 on game port 0 (zero)
  7618.             14 DATRY  Current state of pin 5 on game port 0 (0/1)
  7619.             15 OUTRY  Output enable for pin 5 on game port 0 (zero)
  7620.  
  7621. Notes: This is the read address for the POTGO register ($DFF034).  Most of
  7622. the bits in this register are write-only and always return a zero when read.
  7623. Only bits 8, 10, 12, and 14 return valid data.    The remaining bits are
  7624. controlled via the POTGO register.  (See for more info on these bits)
  7625.    The Amiga's game ports are quite versatile.  Pins 5 and 9 of either port
  7626. can be programmed to receive and send digital data.  This register allows
  7627. you to read the current high-low state of these pins.
  7628.    Simply read the desired pin's DATxx bit to determine its status.  (0 =
  7629. 0v, 1 = +5v)  The positive voltage sent to these pins should never exceed 5
  7630. volts or 400 mA.  ONLY THE VOLTAGE FROM PIN 7 SHOULD BE CONNECTED TO PIN 5
  7631. OR 9.  PIN 7 CARRIES +5 VOLTS FROM THE AMIGA'S OWN POWER SUPPLY.
  7632.    The right mouse button is wired to game port pins 8 and 9.  When the
  7633. button is pressed, these two pins connect.  Pin 8 is grounded, so any
  7634. voltage that 9 carries gets shorted to ground.
  7635.    To sense whether the right mouse button is being pressed on a mouse
  7636. plugged into game port 0, you must first set pin 9 to output.  (i.e.:
  7637. OUTLY = 1 or write $0C00 to POTGO.  For a mouse plugged into port 1, use
  7638. OUTRY and DATRY instead.)  Finally, wait about 300 msec for the voltage to
  7639. reach the game port - and then read the status of pin 9 via the DATLY bit in
  7640. POTGOR.  If this bit equals one, the pin is not grounded, thus the button is
  7641. not pressed.  If it equals zero, the pin is grounded, and the button has
  7642. been pressed.
  7643.    Because Intuition automatically handles game port 0 mouse events, you'll
  7644. have to turn off multitasking if you wish to control this port directly via
  7645. the hardware.  Even accessing port 1 may cause problems since any
  7646. manipulation of POTGO affects all of the bits.    Such confusion usually
  7647. results in the Amiga thinking that the right mouse button is being clicked
  7648. when it really isn't.
  7649.    Rather than calculate a 300 msec delay, you may write a #$C000 to POTGO
  7650. and wait for one vertical blanking period with the following:
  7651.         WaitVertB:
  7652.            move.l VPOSR,d0
  7653.            and.l  #$0001FF00,d0
  7654.            bne    WaitVertB
  7655.            rts
  7656. ----------------------------------------------------------------------------
  7657. $DFF018 SERDATR      Serial Data Input and Status Read
  7658. Status: *R         Paula
  7659.            0-7 DB0-DB7     Byte of data read from serial port
  7660.              8 DB8/STP     Ninth data bit or stop bit
  7661.              9 STP     Stop bit if set up for 9 data bits
  7662.             10 UNUSED
  7663.             11 RxD     Current status of serial port's RxD line
  7664.             12 TSRE     Transmit shift register empty (if 1)
  7665.             13 TBE     Transmit buffer empty (if 1)
  7666.             14 RBF     Receive buffer is full(if 1)
  7667.             15 OVRUN     Receive buffer overrun (if 1)
  7668. ----------------------------------------------------------------------------
  7669. $DFF01A DSKBYTR      Disk Data Byte and Disk Status Read
  7670. Status: *R         Paula
  7671.            0-7 DATA     Byte of data read from disk
  7672.           8-11 UNUSED
  7673.             12 WORDEQUAL Disk Sync pattern found (if 1)
  7674.             13 DISKWRITE Disk controller writing (if 1)
  7675.                  Disk controller reading (if 0)
  7676.             14 DMAOEN     Disk DMA is active (if 1)
  7677.             15 BYTEREADY Bits 0-7 of this register will hold new
  7678.                  data if bit 15 is set.
  7679.  
  7680. Notes: Considering the fact that disk data can be transferred to and from
  7681. memory automatically through DMA, it is neither necessary nor recommended
  7682. that you read data one byte at a time via 0-7, and 15.
  7683.    Bit 12: WORDEQUAL holds a one for only 2 usec!  (The time for one MFM bit
  7684. to pass under the head.)  AmigaDos uses $4489 for the sync.
  7685. ----------------------------------------------------------------------------
  7686. $DFF01C INTENAR      Interrupt Enable Read
  7687. Status: *R         Paula
  7688.              0 TBE    1 = Serial transmit buffer empty interrupt
  7689.                   enabled (level 1)
  7690.              1 DSKBLK 1 = Disk block done int enabled (level 1)
  7691.              2 SOFT   1 = Software interrupts enabled (level 1)
  7692.              3 PORTS  1 = CIA-A and expansion port interrupts
  7693.                   enabled (level 2)
  7694.              4 COPER  1 = Copper interrupt enabled (level 3)
  7695.              5 VERTB  1 = Vertical Blank Int enabled (level 3)
  7696.              6 BLIT   1 = Blitter ready int enabled (level 4)
  7697.              7 AUD0   1 = Audio channel 1 int enabled (level 4)
  7698.              8 AUD1            2
  7699.              9 AUD2            3
  7700.             10 AUD3            4
  7701.             11 DBF    1 = Serial receive buffer full interrupt
  7702.                   enabled (level 5)
  7703.             12 DSKSYN 1 = Disk sync pattern found int enab (lev 5)
  7704.             13 EXTER  1 = CIA-B and expansion port int enab(lev 6)
  7705.             14 INTEN      Master interrupt off switch  (0 = All
  7706.                   ints listed above disabled)
  7707.             15 SETCLR UNUSED by INTENAR
  7708.  
  7709. Notes: The Amiga's hardware is capable of generating 14 interrupts on seven
  7710. levels.  Level 1-6 are maskable, and level 7 is an NMI.  This register tells
  7711. you which ints are enabled or disabled.  To enable or disable an interrupt,
  7712. use this register's write address, INTENA ($DFF09A).  To force an interrupt
  7713. to take place, use register INTREQ ($DFF09C).  To actually find out what
  7714. type of interrupt is taking place, read INTREQR at $DFF01E.
  7715.    When the uP receives an interrupt signal, it takes the level number,
  7716. multiplies it by two, and adds $FFFFF1 to the result.  This calculation
  7717. produces the address of a byte long memory offset contained in ROM.  The
  7718. memory offset is then multiplied by four to obtain the address of the
  7719. interrupt's auto vector - a location that contains the pointer to the
  7720. corresponding interrupt processing routine.  Under the current version of
  7721. ROM, these four byte pointers are stored in locations $64, $68, $6C, $70,
  7722. $74, $78, and $7C, for the level 1-7 interrupts respectively.
  7723.    To prioritize interrupts that share the same level number, Exec has
  7724. assigned each interrupt a pseudo priority number.  Again, the higher this
  7725. number, the higher the priority:
  7726.       Interrupt           680x0 Level    Pseudo-Priority
  7727.       ---------          -----          -----
  7728.       Software               1            1
  7729.       Disk Block Done           1            2
  7730.       Transmit Buffer Empty       1            3
  7731.       CIA-A (exp bus pin 19)       2            1
  7732.       Copper               3            1
  7733.       Vertical Blank           3            2
  7734.       Blitter Done           3            3
  7735.       Audio Channel 2           4            1
  7736.       Audio Channel 0           4            2
  7737.       Audio Channel 3           4            3
  7738.       Audio Channel 1           4            4
  7739.       Read Buffer Full           5            1
  7740.       Disk Sync Pattern Found       5            2
  7741.       CIA-B (exp bus pin 22)       6            1
  7742.  
  7743.    If you plan on handling interrupts completely on your own, note that
  7744. interrupt processing routines are always executed in SUPERVISOR mode.  As a
  7745. minimum, your routine should clear the corresponding bit in the INTREQ
  7746. register to clear that interrupt.  Use the 680x0 instruction RTE to return
  7747. from an interrupt.
  7748.    To cause a raster interrupt to occur, simply make the copper wait for the
  7749. desired line, then store #$8010 in INTREQ:
  7750.       wait 0,100     ; wait for line 100
  7751.       move #$8010,INTREQ ; trigger interrupt
  7752. ----------------------------------------------------------------------------
  7753. $DFF01E INTREQR      Interrupt Request
  7754. Status: *R         Paula
  7755.              The bit by bit explanations are exactly the same
  7756.              except that "enabled" is replaced with "requested".
  7757.              See INTENAR ($DFF01C) for details.
  7758. ----------------------------------------------------------------------------
  7759. $DFF020 DSKPTH         Disk Pointer
  7760. $DFF022 DSKPTL
  7761. Status: *W         Agnus
  7762.              This is where you store the starting address of your
  7763.              disk data prior to activating disk DMA.  DSKPT is
  7764.              broken into a High and Low portion.  Note that if your
  7765.              Amiga does not have a 1MB Agnus, you cannot specify
  7766.              an address above $7FFFF.  Otherwise, it is $FFFFF.
  7767.              The low bit is always interpreted as zero, so the
  7768.              data must begin at an even location.
  7769. ----------------------------------------------------------------------------
  7770. $DFF024 DSKLEN         Disk Data Length
  7771. Status: *W         Paula
  7772.           0-13 LENGTH Number of words to read or write
  7773.             14 WRITE  1 = Activate write mode  0 = read mode
  7774.             15 DMAENA 1 = Enable Disk DMA  0 = Disable Disk DMA
  7775.  
  7776. Notes: You must write the same value TWICE in a row in order for the value
  7777. to take effect.  This double write rule was incorporated to safeguard
  7778. against accidental disk activity - programs that lose control and start
  7779. trashing memory can't just shove a number into this register and initiate
  7780. potentially harmful disk activity.
  7781.    Since the length must be stored in 14 bits, the data cannot be longer
  7782. than 32766 bytes.  The DMA hardware uses this length value as a counter.
  7783. Every time a word of data is transferred to or from disk, this counter is
  7784. decremented, and the address in the DSKPT register incremented.  Transfer
  7785. stops when this value reaches zero.
  7786.    Because of a bug in the Amiga Hardware, the last three bits of data are
  7787. missing.  To remedy this, save one more word than necessary.
  7788.    Before and after doing any disk operations, set this register to #$0000
  7789. to enable read mode and disable disk DMA.
  7790.    Bit 15: Setting this bit initiates disk DMA.  It will not start, however,
  7791. until the DMAENA bit in the ADKCON register ($DFF09E) is also set.  You'll
  7792. have to set both of these bits in order to perform any DMA-controlled disk
  7793. operations.  NEVER start disk DMA unless a previous operation is complete or
  7794. you may wind up trashing the data on the disk!    To find out when a read or
  7795. write operation is complete, use the disk block done interrupt, which can be
  7796. detected through the use of the DSKBLK bit (1) in the INTEQR register at
  7797. $DFF01E.
  7798. ----------------------------------------------------------------------------
  7799. $DFF026 DSKDAT         Disk DMA Write
  7800. Status: *W         Paula
  7801.              This is the data buffer used by the disk DMA when
  7802.              transferring data.  It is the write address of the
  7803.              DSKDATR register ($DFF008).
  7804. ----------------------------------------------------------------------------
  7805. $DFF028 REFPTR         Refresh Pointer
  7806. Status: *W         Agnus
  7807.              The Amiga uses this register as a RAM refresh address
  7808.              register.    Do not modify the value there or you may
  7809.              corrupt the contents of RAM!  It is for diagnostic
  7810.              purposes only.
  7811. ----------------------------------------------------------------------------
  7812. $DFF02A VPOSW         Vertical Beam Position Write
  7813. Status: *W         Agnus
  7814.              This is the write address of the VPOSR register
  7815.              located at $DFF004.  Note the warnings that apply for
  7816.              the refresh pointer as they also apply.
  7817. ----------------------------------------------------------------------------
  7818. $DFF02C VHPOSW         Vertical/Horizontal Beam Position Write
  7819. Status: *W         Agnus
  7820.              This is the write address of the VHPOSR register
  7821.              located at $DFF006.  Note the warnings that apply for
  7822.              the refresh pointer as they also apply.
  7823.  
  7824. ----------------------------------------------------------------------------
  7825. $DFF02E COPCON         Coprocessor Control
  7826. Status: *W         Agnus
  7827.              0 UNUSED
  7828.              1 CDANG  Copper Danger Bit (1 = Copper can access
  7829.                   blitter registers  0 = Copper cannot.)
  7830.           2-15 UNUSED
  7831.  
  7832. Notes: A one value allows access to $DFF040+, and a zero value $DFF080+.
  7833. For instructions on the copper and its instruction set, see locations
  7834. $DFF080-$DFF08C.
  7835. ----------------------------------------------------------------------------
  7836. $DFF030 SERDAT         Serial Data Output
  7837. Status: *W         Paula
  7838.            0-7 DB0-DB7     Byte of data to be output
  7839.              8 DB8/STP     Ninth data bit or stop bit
  7840.              9 STP     Stop Bit if sending nine data bits
  7841.          10-15 UNUSED     (See below)
  7842.  
  7843. Notes: To send data out the serial port, simply store it here.    Upon
  7844. receiving a nonzero value, the contents of the register are shifted out the
  7845. serial port - low bit first, high bit last until its contents are empty
  7846. (equal zero).  Since the start bit is sent automatically, DO NOT include it
  7847. as part of your data.  Because you must send at least one stop bit, SERDAT
  7848. should never equal zero.
  7849.    By convention, only 8 or 9 data bits should be stored in this register at
  7850. any on time.  However, because this is a true 16 bit register, up to 15 data
  7851. bits and one stop bit can be output in just one shot - an interesting, if
  7852. questionably useful feature.
  7853. ----------------------------------------------------------------------------
  7854. $DFF032 SERPER         Serial Period (Transfer Rate) and Data Bit Control
  7855. Status: *W         Paula
  7856.           0-14 RATE   Bit transfer rate specified in increments of
  7857.                   279.4 nsec.
  7858.             15 LONG   Number of data bits to expect when receiving
  7859.                   data (1 = nine  0 = eight data bits)
  7860.  
  7861. Notes: The value stored in bits 0-14 determine how many bus cycles occur
  7862. between each bit sent or received through the serial port.  So, if one bit
  7863. is to be sent every X bus cycles, use X-1.  Serial transfer rates are
  7864. usually specified in baud rates, not bus cycles.  Use this formula to
  7865. translate the baud rate into the period value this regiester expects:
  7866.       Period = (3579546 / Baudrate) - 1
  7867.    The period value for the six most common baud rates are:
  7868.      Baud Rate   Period
  7869.      ---------   ------
  7870.         300       11931
  7871.         600       5965
  7872.        1200       2982
  7873.        2400       1490
  7874.        4800        745
  7875.        9600        372
  7876.    Bit 15: Affects incoming, not outgoing data length.
  7877. ----------------------------------------------------------------------------
  7878. $DFF034 POTGO         Pot Port Data
  7879. Status: *W         Paula
  7880.              See POTGOR at $DFF016 for an explanation on how this
  7881.              write register works.
  7882. ----------------------------------------------------------------------------
  7883. $DFF036 JOYTEST      JOY0DAT and JOY1DAT Write
  7884. Status: *W         Denise
  7885.              This register allows you to set the contents of the
  7886.              JOY0DAT and JOY1DAT registers at $DFF00A / $DFF00C.
  7887.              The value stored here affects both registers,
  7888.              allowing you to reset the mouse position counters for
  7889.              both ports with just one instruction.
  7890. ----------------------------------------------------------------------------
  7891. $DFF038 STREQU         Short Frame Vertical Blank Strobe
  7892. $DFF03A STRVBL         Normal Vertical Blank Strobe
  7893. $DFF03C STRHOR         Horizontal Sync Strobe
  7894. $DFF03E STRLONG      Long Raster Strobe
  7895. Status: Strobe         Denise (Denise/Paula on STRHOR)
  7896.              Do not read to or write from any of these registers.
  7897.              Doing so would falsely trigger the strobe and confuse
  7898.              the Amiga.
  7899. ----------------------------------------------------------------------------
  7900. Location Range: $DFF040-$DFF074  The Blitter Registers
  7901.  
  7902.    The blitter takes care of almost all of the Amiga's bitmapped graphics
  7903. manipulation, from drawing lines to moving objects and filling outlined
  7904. areas.    Intuition, for example, uses the blitter for such things as drawing
  7905. gadgets and printing text.  And one of the best things about the blitter is
  7906. that it executes independently, allowing the Amiga to animate objects while
  7907. the uP is hard at work executing program instructions.
  7908.  
  7909.    Copy Mode: The blitter's main task is to copy data from one area of
  7910. memory to another.  This operation is specified as a blit.  The blitter was
  7911. specifically designed to copy bitmap data, however, you can use the blitter
  7912. to copy whatever type of data you choose.
  7913.    Data to be copied may come from up to three different locations in
  7914. memory, but you can have only one destination address.    The blitter refers
  7915. to the source addresses as A, B, and C.  The destination area is called D.
  7916.    When using more than one source address, the blitter must combine the
  7917. data from the different sources before it can be written back out.  To do
  7918. this, it performs any combination of eight different logic operations called
  7919. miniterms.  Miniterms allow you to combine the bits from A, B, and C in 256
  7920. different ways before they reach their destination.  This provides the
  7921. programmer with great flexibility when copying bitmapped images.  Shapes can
  7922. be inverted, merged, "cookie cut", and so on.  Bits 0-7 in the BLTCON0
  7923. register at $DFF040 control the miniterm settings.
  7924.    The most common use for the blitter is to move rectangular areas of a
  7925. bitmapped screen.  Because of the way screen bitmaps are laid out, it would
  7926. be impractical if all you could do was to copy consecutive bytes in memory.
  7927. Instead, you must be able to skip several bytes between each horizontal
  7928. screen line.  That way, you don't have to copy objects that take up the
  7929. entire width of the screen.
  7930.    The BLTAMOD-BLTDMOD registers ($DFF060-$DFF066) allow you to specify the
  7931. difference between the width of the object being copied and the width of the
  7932. bitmap.  The BLTSIZE register at $DFF058 defines width and height of the
  7933. source and destination area.  Together these registers allow the blitter to
  7934. copy any rectangular area of a bitmap.
  7935.    The memory addresses of A, B, and C go in registers BLTAPT, BLTBPT, and
  7936. BLTCPT ($DFF050, $DFF04C, and $DFF048) respectively, and the D address goes
  7937. in register BLTDPT ($DFF054).  When specifying A, B, C, or D, you must
  7938. provide the blitter with an even, word aligned address.
  7939.    Because bitmapped objects don't always begin on a word aligned address,
  7940. and their width isn't always an even multiple of 16 (16 bits = 1 word), the
  7941. blitter can mask out certain bits in the first and last word of each
  7942. horizontal line copied from source A.  This way, you can copy an area that
  7943. starts at any pixel location and is of any pixel width you desire.  The
  7944. first word mask for source A goes in register BLTAFWM ($DFF044).  The last
  7945. word mask goes in register BLTALWM ($DFF046).  In effect, the first word of
  7946. each line is ANDed with BLTAFWM and the last word of each line is ANDed with
  7947. BLTALWM before they are written to destination RAM.
  7948.    To move bitmapped images horizontally with pixel accuracy, it is
  7949. necessary to shift the image's data one bit at a time.  Using bits 12-15 in
  7950. the BLTCON0 and BLTCON1 registers ($DFF040 and $DFF042), you can tell the
  7951. blitter to shift source A and/or source B data right 0-15 bits before it's
  7952. transferred to it's destination.  The shifting takes place within the
  7953. blitter so it does not affect the area of memory actually being copied.
  7954.    Shifting is not restricted by word boundaries; a word's low bit is
  7955. shifted into the high bit of the following word.  If there is no previous
  7956. word of data being copied (i.e. if the current word is the very first word
  7957. of data being copied), zeroes are shifted into the word's high bits.
  7958.    What happens when you need to shift something left, say a pixel?  Well,
  7959. simply shift it right (16-x) times.  The only difference is that your data
  7960. is one word further to the right.  Optionaly, you could also run the blitter
  7961. in descending mode.  In this mode, data is shifted left by the value stored
  7962. in bits 12-15 of the BLTCON0 and BLTCON1 registers.  Here's another reason
  7963. for operating the blitter in descending mode:
  7964.    The blitter is usually called upon to move objects around the screen.
  7965. Generally, a programmer will do this by copying an object's data from a
  7966. special buffer area in memory to the screen's bitmap.  (Since the blitter
  7967. can only copy to one destination area at a time, you'll have to do a blitter
  7968. operation for each bit plane.)    Next, a copy of the screen's background is
  7969. copied to the screen to erase the object.  Finally, the object is copied to
  7970. a different location on the screen, thus making in move.
  7971.    In the previous example, data was copied from two separate areas of
  7972. memory.  Sometimes it's desirable to copy to and from areas that overlap.
  7973. However, this may cause problems because the blitter may copy a piece of
  7974. data into a memory location that hasn't been read yet, thus destroying it.
  7975. (i.e. If the destination and source overlap, and the destination is higher
  7976. in memory, bye-bye data!)
  7977.    To avoid the problem of overlapping data, the blitter can be run in two
  7978. modes: ascending and descending.  When should you use descendong mode?
  7979. Well, if the end of the source overlaps the start of the destination, use
  7980. descending mode.  If the start of the source overlaps the end of the
  7981. destination, use ascending mode.  If the source and destination don't
  7982. overlap, it doesn't matter what you use.  The DESC bit (1) in the BLTCON1
  7983. register at $DFF042 determines the blitter's current mode.
  7984.    To initiate a blitter copy operation, you should first select the blitter
  7985. copy mode by NOT setting the LINE bit (0) in the BLTCON1 register at
  7986. $DFF042.  Second, tell the computer the address of your source data using
  7987. the BLTAPT, BLTBPT, BLTCPT, and the destination data at BLTDPT.  (These
  7988. addresses should specify the starting or ending addresses of the data
  7989. depending on whether the blitter is running in ascending or descending mode,
  7990. respectively.)    Third, use BLTCON0 to select the desired miniterms and tell
  7991. the computer which sources you're using (A, B, and/or C) and enable the
  7992. blitter's D destination channel.  (If you don't enable D, data isn't going
  7993. anywhere!)  Fourth, set up any other options you want such as shifting or
  7994. masking of data.  Finally, write the width and height of the area to be
  7995. copied into the BLTSIZE register at $DFF058.  Writing to BLTSIZE
  7996. automatically starts the blitter, so it SHOULD BE THE VERY LAST THING YOU
  7997. SET!  During the blitter operation, the BBUSY bit (14) in the DMACONR
  7998. register is set equal to one.  When the blitter is finished, this bit is
  7999. cleared.
  8000.    The following happens during a blitter copy operation: Data is copied one
  8001. word at a time from the memory address specified by the BLTxPT registers to
  8002. the address found in BLTDPT.  Every time a word is copied, the BLTxPT
  8003. registers are incremented (or decremented if in descending mode).  When the
  8004. number of words to b copied matches the width in the BLTSIZE register, the
  8005. modulation value found in the BLTxMOD registers is added to the BLTxPT
  8006. registers and the copying continues on the next line.  When the number of
  8007. lines copied equals the height in BLTSIZE, the operation is complete and the
  8008. blitter stops.
  8009.  
  8010.    Fill Mode: The blitter offers a crude area-fill option that works in
  8011. tandem with the data-copy operation described above.  Fill mode is activated
  8012. by BLTCON1's IFE (Inclusive Fill Enable) bit or EFE (Exclusive Fill Enable)
  8013. bit prior to turning on the blitter.  After the blitter reads data from
  8014. memory and manipulates it according to the miniterm settings, the specified
  8015. fill operation is performed on the data before it is written to destination
  8016. memory.  Fill operations work IN DESCENDING MODE ONLY!    The figure below
  8017. illustrates the effect of each type of fill operation has on data:
  8018.  
  8019.                After:
  8020.         Before   FCI = 0   FCI = 1
  8021.  
  8022.        00011000  00011000  11111111
  8023.        00100100  00111100  11100111
  8024.        01000010  01111110  11000011
  8025. Fill       01000010  01111110  11000011
  8026.        00100100  00111100  11100111
  8027.        00011000  00011000  11111111
  8028.  
  8029.        00011000  00001000  11110111
  8030.        00100100  00011100  11100011
  8031. Exclusive  01000010  00111110  11000001
  8032. Fill       01000010  00111110  11000001
  8033.        00100100  00011100  11100011
  8034.        00011000  00001000  11110111
  8035.  
  8036.    In all fills, the blitter evaluates data one bit at a time, starting at
  8037. the rightmost edge and moving to the left.  Before the fill begins, however,
  8038. the blitter takes note of the FCI bit (2) of the BLTCON1 register.  The
  8039. value of this bit becomes the initial fill value of the blitter's fill bit.
  8040. For the sake of clarity, let's assume FCI starts at zero.
  8041.    Here's how inclusive fill works: As the blitter moves left, it changes
  8042. all zero bits to zero, because zero is the current value of the fill bit.
  8043. When the blitter encounters a 1 bit, it toggles the fill bit, changing it to
  8044. a one.    Now the blitter changes the following 0 bits to 1, because that is
  8045. the current value of the fill bit.  Every time the blitter encounters a 1
  8046. bit in the data, the fill bit changes value.  The figure above illustrates
  8047. the difference between fills that start with FCI = 0 or FCI = 1.
  8048.    Exclusive fills take one extra step when they encounter a 1 bot.  In
  8049. addition to toggling the fill bit, the blitter replaces that 1 bit with the
  8050. new fill-bit value.
  8051.    Both types of fills expect borders to be defined by a single 1 bit - one
  8052. bit to tell the blitter that it's inside an area, and the other to tell it
  8053. that it's outside.  When the blitter encounters two one bits in a row, it
  8054. assumes that there is no space to be filled since there is no zero bit
  8055. between pixels.  If the blitter encounters three 1 bits in a row, the
  8056. blitter assumes that it has gone in, out, then back in to an area to be
  8057. filled.  (The fill bit has been toggled three times.)  This happens when the
  8058. blitter runs across an odd number of adjacent bits.
  8059.    To execute a fill operation, simply set up the blitter registers for a
  8060. standard copy operation, set either the IFE or EFE bit, set the FCI bit to
  8061. the desired value, set the DESC to put the blitter in descending mode, then
  8062. start the blitter by writing the area size to the BLTSIZE register.  By
  8063. setting the blitter's source address equal to the destination address, you
  8064. can fill an area without having to copy data from one separate location to
  8065. another.
  8066.  
  8067.    Line Mode: Besides copying data and filling areas, the blitter has one
  8068. more talent: drawing lines.  In line mode, almost all of the blitter
  8069. registers change their functions.
  8070.    The blitter draws lines at incredible speeds, much faster than the 68000.
  8071. Unfortunately, you can't just give the blitter two points and then tell it
  8072. to connect the dots.  You need to perform some calculations first.
  8073.    Let's say that you want to draw a line from point (x1,y1) to (x2,y2).
  8074. From these coordinates you need to figure out the horizontal and vertical
  8075. distance between the line's two end points.  This is easily calculated using
  8076. the following two formulae:
  8077.       dx = abs(x1-x2)
  8078.       dy = abs(y1-y2)
  8079.    Now you're ready to give the BLTCON1 register at $DFF042 some information
  8080. about the physical orientation of the line.
  8081.       If (dx >= dy) and (x1 >= x2) set bit 2.
  8082.       If (dx < dy)  and (y1 >= y2) set bit 2.
  8083.       If (dx >= dy) and (y1 >= y2) set bit 3.
  8084.       If (dx < dy)  and (x1 >= x2) set bit 3.
  8085.       If (dx >=dy)           set bit 4.
  8086.    Together, these bits define the octant (position relative to the line's
  8087. starting position) in which the line will appear.  The following shows how
  8088. the Amiga divides the screen into octants:
  8089.  
  8090.          \      |    /      * = x1,y1
  8091.           \ 3 | 1 /       Note: The numbers shown in this figure
  8092.          7 \  |  / 6      represent the combined value of BLTCON1's
  8093.         \ | /          bits 2-4.  If the line appears on the border
  8094.          -----*-----      of two octants, it does not matter which of
  8095.         / | \          the two octants you select.
  8096.          5 /  |  \ 4
  8097.           / 2 | 0 \
  8098.          /      |    \
  8099.  
  8100.    Next, you need to determine which value is larger: dx or dy.  Let dmax
  8101. equal the greater value, and dmin the lesser value.  Now use these values to
  8102. set the following registers:
  8103.       dmax = max(dx,dy)
  8104.       dmin = min(dx,dy)
  8105.      BLTBMOD = 4* dmin
  8106.      BLTAMOD = 4 * (dmax-dmin)
  8107.      BLTAPTL = (4 * dmin) - (2 * dmax)
  8108.    These formulae define the line's slope.  If the result of the last
  8109. calculation BLTAPTL is negative, you must store a 1 in the SIGN bit (6) of
  8110. the BLTCON1 register.
  8111.    Besides holding the line's octant number and the negative/positive status
  8112. of the line's slope, BLTCON1 affects the line's physical appearance.  If
  8113. you're drawing lines to enclose an area that you plan to fill later using
  8114. blitter fill mode, you should set the ONEDOT bit (1) equal to one.  This
  8115. tells the blitter to draw lines using only one pixel per raster, thus
  8116. providing a single pixel border for your object.
  8117.    To create textured lines, BLTCON1's bits 12-15 work in conjunction with
  8118. the BLTBDAT register ($DFF072).  The bit pattern found in BLTBDAT defines
  8119. the pixel pattern used to draw lines.  For normal solid lines, set all of
  8120. BLTBDAT's bits to one.  (i.e. $FFFF)  Other values create dotted or dashed
  8121. lines.    Bits 12-15 in BLTCON1 allow you to specify which bit in BLTBDAT,
  8122. 0-15, defines the status of the first pixel in the line.  For most practical
  8123. purposes, BLTCON1's bits 12-15 should be set equal to the value of x1's
  8124. lower 4 bits.  (i.e. x1 AND $0F)  This informs the blitter to start the line
  8125. off with the value found in BLTBDAT's MSB (15).  IMPORTANT: ALWAYS SET
  8126. BLTCON1 PRIOR TO BLTBDAT!
  8127.    BLTCON1's bit 5 should always be set to zero, as should bits 7 through
  8128. 11.  To tell the blitter that you want to draw lines instead of copy data,
  8129. the LINE bit (0) must be set to 1.
  8130.    The Amiga needs certain information about the size and location of the
  8131. screen's bitmap before it can draw a line.  First, store the byte-width
  8132. (number of pixels divided by 8) of the bitmap in the BLTCMOD and BLTDMOD
  8133. registers ($DFF060 and $DFF066).  Next, you must put the address of the word
  8134. containing the starting point of the line into the BLTCPT and BLTDPT
  8135. registers.  ($DFF048 and $DFF054)
  8136.    Only one bitplane can be written to during a single blitter operation.
  8137. So, to draw a line of a particular color on a multiple bitplane screen, it
  8138. may be necessary to perform two or more line blits.  In these cases, you set
  8139. the registers up for the first bitplane as usual, and perform the blit; then
  8140. for subsequent bitplanes, you simply reinitialize the registers with the
  8141. same values EXCEPT for the registers BLTCPT and BLTDPT, which must contain
  8142. the address of the line's starting point within the new bitplane.
  8143.    As with blitter copy mode, you must set bits 0-7 in the BLTCON0 register
  8144. ($DFF040) to choose a miniterm.  Usually, you should store $CA here, but if
  8145. you prefer to XOR your line onto the screen (invert all the pixels found on
  8146. the line), store a $4A here.
  8147.    BLTCON0's bits 8-11 should be set equal to $B.  (This activates blitter
  8148. source A and C, and destination D.)  Store x1's lower four bits (x1 AND $0F)
  8149. into BLTCON0's bits 12-15.  The blitter uses this value to determine the bit
  8150. position of the line's starting point within the bitplane memory location
  8151. specified by registers BLTCPT and BLTDPT.
  8152.    Now, set BLTADAT ($DFF074) equal to $8000.  (Set this register only AFTER
  8153. you've set BLTCON0)  Only two more registers must be set before you can
  8154. activate the blitter: BLTAFWM and BLTALWM.  ($DFF044 and $DFF046)  Store a
  8155. $FFFF into both.
  8156.    Finally, you're ready to start the blitter by writing to the BLTSIZE
  8157. register ($DFF058).  Use the following formula to determine the value that
  8158. you should store into this register:
  8159.       BLTSIZE = (dmax * 64) + 66
  8160.    Because writing to BLTSIZE turns on the blitter, this should be the last
  8161. register that you set.
  8162.  
  8163.    General Guidelines: When programming the blitter at the hardware level
  8164. with multitasking turned on, you must be sure to grab the blitter for your
  8165. own exclusive use so other programs don't try to use it.  Using the library
  8166. function call OwnBlitter() you can reserve the blitter for your own
  8167. personal use.  The function call DisownBlitter() frees the blitter so other
  8168. programs can use it.
  8169.    Before writing to any of the blitter registers, you must be sure the
  8170. blitter isn't currently in operation, even after a call to OwnBlitter().  To
  8171. ensure the blitter's dormancy, you can use the function call WaitBlit(), or
  8172. you can read the status of the BBUSY bit found in the DMACONR register at
  8173. $DFF002.
  8174.    Under normal operation conditions, the Amiga's microprocessor has
  8175. priority over the blitter when it comes to accessing chip RAM.    Because of
  8176. the way memory cycles are allocated, memory conflicts rarely occur between
  8177. the blitter and the 68000.  However, if time is a critical factor, you can
  8178. give the blitter a higher priority than the 68000 by setting the BLTPRI bit
  8179. in the DMACON register ($DFF096).
  8180.    The blitter can perform so many special operations on a word of data that
  8181. it's important to know the order in which these operations take place.
  8182. Masking via the BLTAFWM and BLTALWM register takes effect first (assuming
  8183. the data was obtained from A and is either the first or last word of a
  8184. horizontal line.); next the data is shifter, if a shift was specified my the
  8185. source's shift bits (ASHx or BSHx); the miniterm operations are performed
  8186. next; and finally, the data is filled according to the status of BLTCON1's
  8187. EFE, IFE, and FCI bits.  Only after all this does the data reach its
  8188. destination.
  8189.    As a general rule, you should always write zeroes to any unused bits in
  8190. a blitter register.  On future versions of the Amiga blitter, these bits may
  8191. be used to perform new functions - functions that could freak your program
  8192. if mistakingly activated!
  8193.    In the following register explanations, a lowercase letter (i.e.: a, b,
  8194. c) will be used to specify a normal miniterm descriptor, and a capital
  8195. letter it's NOTted equivalent.  (i.e. A, B, C = NOT a, NOT b, NOT c)  This
  8196. is for the miniterm descriptors only!
  8197. ----------------------------------------------------------------------------
  8198. $DFF040 BLTCON0      Blitter Control Register 0
  8199. Status: *W         Agnus
  8200.              0 LF0    1 = Selects miniterm ABC
  8201.              1 LF1    1 = Selects miniterm ABc
  8202.              2 LF2    1 = Selects miniterm AbC
  8203.              3 LF3    1 = Selects miniterm Abc
  8204.              4 LF4    1 = Selects miniterm aBC
  8205.              5 LF5    1 = Selects miniterm aBc
  8206.              6 LF6    1 = Selects miniterm abC
  8207.              7 LF7    1 = Selects miniterm abc
  8208.              8 USED   1 = Enable DMA for D
  8209.              9 USEC   1 = Enable DMA for C
  8210.             10 USEB   1 = Enable DMA for B
  8211.             11 USEA   1 = Enable DMA for A
  8212.          12-15 ASH0-3 Preshift value for A
  8213.              For Line Mode:
  8214.            0-7 LF0-LF7     Miniterm value, usually $CA
  8215.              8 USED     Set to 1
  8216.              9 USEC     Set to 1
  8217.             10 USEB     Set to 0
  8218.             11 USEA     Set to 1
  8219.          12-15 START0-3  Set to (x1 and #$0F)
  8220.  
  8221.    Here's how BLTCON0's bits operate in normal copy mode:
  8222.    Bits 0-7: Each of these bits controls a particular miniterm - a logical
  8223. operation performed on blitter source data before it reaches its
  8224. destination.  To activate a miniterm, simply set its bit equal to one.    You
  8225. may select as many or as few as you want.
  8226.    Using miniterms, you can slice and dice data in a variety of ways.
  8227. Suppose you set bit zero equal to one.    In this case, the miniterm is ABC.
  8228. What that means is that a one bit will be output to D only when:
  8229.       A=0, B=0, and C=0!  Any other combination results in a zero output.
  8230. Conversely, miniterm abc will output a one only when A, B, and C are equal
  8231. to one.
  8232.    For more complex results, it's possible to activate more than one
  8233. miniterm at once.  The resulting miniterms are added together (OR'ed) and
  8234. simplified.  Thus:  aBC + aBc can be simplified to aB.    (If the values are
  8235. different as in the case of the C's, they cancel out.)  You may expand aB in
  8236. the same way to aBC + aBc.
  8237.    To fill an area of memory with zeroes, don't select any miniterms.
  8238. Consequently, you can fill memory with #$FF's by selecting all of the
  8239. miniterms.  The following table contains the miniterm settings avaliable to
  8240. graphics.library function calls:
  8241.       Miniterm Val   Miniterm Logic    Result of Most Useful Settings
  8242.       ------------   --------------    ------------------------------
  8243.       #$00         always zero       Clear Destination
  8244.       #$10         aBC
  8245.       #$20         aBc
  8246.       #$30         aB            Copy inverted source to destination
  8247.       #$40         abC
  8248.       #$50         aC            Invert Destination
  8249.       #$60         aBc + abC           Merge (cookie cut) source with dest.
  8250.       #$70         aB + aC
  8251.       #$80         ABC           Write 1s only where source & dest
  8252.                        overlap
  8253.       #$90         abc + aBC
  8254.       #$A0         ac
  8255.       #$B0         ac + aB
  8256.       #$C0         ab            Direct copy of source to destination
  8257.       #$D0         ab + aC
  8258.       #$E0         ac + ab           Combine (mix) source with destination
  8259.       #$F0         always one        Fill Destination
  8260.  
  8261. Note: Even if you try to set the lower four bits of a graphics.library
  8262. miniterm, the system will zero them out before actually writing this value
  8263. to the register's LFx bits.
  8264.       If you set the blitter's sources the same way that the
  8265. graphics.library does - A points to a mask (usually $FFFF), B points to the
  8266. source data, and C points to the Destination data - you can use this table
  8267. to determine the miniterm settings for your own blitter routines.
  8268.    When blitting with only one or two sources active, choose miniterms that
  8269. aren't affected by the value of the unused source(s).
  8270.  
  8271.    Bit 8: This bit determines whether the blitter's destination DMA is
  8272. enabled.  Seting this bit to one enabled the DMA, and 0 Disables it.  If
  8273. destination DMA is disabled, nothing can be written during a blit.  This
  8274. seemingly useless feature turns out to be quite useful feature for detecting
  8275. collisions between two images.    Simply set up the blitter for sources A and
  8276. B to point to the two images, select miniterm logic ab ($C0), activate the
  8277. blitter, wait for the blitter to finish, and then check the BZERO bit (13)
  8278. of the DMACON register at $DFF002.  If BZERO = 0, the images touch.  Because
  8279. the BZERO bit is valid even if the data isn't written to memory, you don't
  8280. need to activate destination D for this type of collision detection to work.
  8281.  
  8282.    Bits 9-10: These bits determine which of the blitter's sources: A, B,
  8283. and/or C are active during a blitter operation.  Writing a one to any of
  8284. these bits turns on the DMA for the corresponding source.  When the blitter
  8285. is turned on, data is read from the memory specified by the active source's
  8286. BLTxDAT register.  For this reason, it is important to PREINITIALIZE the
  8287. BLTxDAT register of all unused sources before performing a blit.  If you
  8288. don't want inactive sources to affect the results of a blit, choose
  8289. miniterms that ignore the values of such sources.
  8290.  
  8291.    Bits 12-15: Prior to applying the value of source A to the selected
  8292. miniterm operation, the blitter shifts the value the number of times
  8293. specified in these bits.  (If the blitter is in ascending mode, the data is
  8294. shifted right, otherwise, it is shifted left.)    Obviously, shifting does not
  8295. occur if all of these bits are set to zero.
  8296.    Whenever you tell the blitter to shift the data in source A, you must
  8297. store a modulo value that's one less than normal in the BLTAMOD and BLTDMOD
  8298. registers.
  8299.  
  8300.    Line Mode - Here's how the register functions in line mode:
  8301.    Bits 0-7: These bits control the miniterm setting used to combine the
  8302. line's bits (obtained from A) with the bits in the destination bitplane
  8303. (obtained from source C).  Source B is used as a mask for generating
  8304. patterned lines.  For normal lines, use a miniterm setting of #$CA.  To draw
  8305. a line of inverted pixels, use miniterm value #$4A.
  8306.    Bits 8-11: The blitter draws lines using source A as a point generator, B
  8307. as the static mask, and C for reading the current status of the destination
  8308. bitplane, and D for outputting the pixels.  Because we don't want the mask
  8309. in source B to change, source B's DMA should be inactive.  All of the
  8310. blitter's other channels must be active however.  As a result, you should
  8311. always set these bits equal to #$B when using the blitter to draw lines.
  8312.    Bits 12-15: These bits must equal the lower four bits of horizontal
  8313. coordinate x1.    Although these are referred to as the START bits in line
  8314. mode, their contents still specify a shift value, as they do in copy mode.
  8315. Here's how it works: In line mode, you must initialize source A's data
  8316. register (BLTADAT) with a $8000.  This puts a 1 bit in the leftmost position
  8317. in the word.  The value stored in these START bits specifies how far that
  8318. data is to be shifted to the right.  By shifting that bit right by the value
  8319. found in x1's lower 4 bits, you move the bit into the pixel position of the
  8320. line's starting point.
  8321.  
  8322.    Now the cheat: Here's a quick and easy formula for calculating the value
  8323. that you must store in BLTCON0 when drawing lines:
  8324.       3018 + ((x1 and #$0F) * 4096)
  8325.  
  8326.    This specifies the miniterm value for a normal line and provides the
  8327. blitter with the bit position of x1 within the memory location found in
  8328. registers BLTCPT and BLTDPT.  ($DFF048 and $DFF054)  To XOR a line onto the
  8329. screen (invert any of the bits located within the line), subtract 128 from
  8330. the result of the above calculation.
  8331. ----------------------------------------------------------------------------
  8332. $DFF042 BLTCON1      Blitter Control Register 1
  8333. Status: *W         Agnus
  8334.              For Blitter Moves and Fills:
  8335.              0 LINE   1 = activate line draw mode, 0 = normal copy
  8336.              1 DESC   1 = descending operation, 1 = ascending op.
  8337.              2 FCI    Starting bit for fill mode
  8338.              3 IFE    Enables inclusive fill mode
  8339.              4 EFE    Enables exclusive fill mode
  8340.           5-11 UNUSED Always set to zero.
  8341.          12-15 BSH0-3 Preshift value for source B
  8342.  
  8343.              For Line Mode:
  8344.              0 LINE   Set to one
  8345.              1 ONEDOT 1 = Draw lines with only a single pixel per
  8346.                   raster
  8347.              2 AUL    Set if ((dx>=dy)and(x1>=x2) or
  8348.                      ((dx<dy) and(y1>=y2))
  8349.              3 SUD    Set if ((dx>=dy)and(y1>=y2) or
  8350.                      ((dx<dy) and(x1>=x2))
  8351.              4 SUL    Set if dx>=dy
  8352.              5 UNUSED Always set to zero
  8353.              6 SIGN   Set if (4*dmin)<(2*dmax)
  8354.           7-11 UNUSED Always set to zero
  8355.          12-15 TEXTURE0-3 Set to (x1 and #$0F)
  8356.  
  8357.    Here's how BLTCON1's bits operate in normal copy mode:
  8358.    Bit 0: This bit activates line mode.  It must be set to zero for copy
  8359. operations.
  8360.    Bit 1: Storing a one here puts the blitter in descending mode.  Do that
  8361. whenever your source and destination overlap and the destination data has a
  8362. higher address than the source.  You should also use descending mode if you
  8363. plan on shifting data left.  You MUST use descending mode for a blitter fill
  8364. operation.  When descending mode is active, the BLTAPT, BLTBPT, and BLTCPT
  8365. registers ($DFF050, $DFF04C, and $DFF048) must point to the last word in the
  8366. memory area to be written to.  Normally, in ascending mode, these registers
  8367. point to the start of the memory area.
  8368.    Bit 2: The value of this bit determines the initial fill value used by
  8369. the blitter in fill mode.  Fill mode is activated by setting either of the
  8370. following two bits.
  8371.    Bit 3: Activates inclusive fill mode (See above)
  8372.    Bit 4: Activates exclusive fill mode (See above)  For normal copy
  8373. operations, both this bit and bit 3 should be set to zero.  Fills are
  8374. performed on data only after it has been run through the selected miniterm.
  8375.    Bits 12-15: Prior to applying the value of source B to the selected
  8376. miniterm operation, the blitter shifts the value the number of times
  8377. specified in these bits.  (If the blitter's in ascending mode, data's shifted
  8378. right.    If the blitter is in descending mode, the data is shifted left.)
  8379. Shifting does not occur if you write a zero to these bits.
  8380.    Whenever you tell the blitter to shift the data in source B, you must
  8381. store a modulo value that is one less than normal in the BLTBMOD and BLTDMOD
  8382. registers.
  8383.  
  8384.    Line Mode: To activate line mode, set bit zero of this register equal to
  8385. one.  Setting the ONEDOT bit (1) tells the blitter to draw lines that have
  8386. only one pixel on each horizontal row.    For clear, clean lines, you should
  8387. set this bit equal to zero.  But if you are drawing objects that you plan to
  8388. fill later using the blitter fill operation, this bit should be set to one.
  8389. This way, the area to be filled in will be enclosed by single pixel walls,
  8390. just as the blitter expects them to be.  Bit 5, and bits 7-11 should be set
  8391. to zero.  The value of the remaining bits depends on the line's coordinates.
  8392.    You might be interested to know that this register's TEXTURE bits are
  8393. actually used as a shift value, as they are in blitter copy mode.  You see,
  8394. blitter source B is used as a mask for creating textured lines.  Because a
  8395. line may start at any pixel position, it is necessary to shift the mask
  8396. found in BLTBDAT to align its high bit with the line's starting point.  As
  8397. with bits 12-15 in the BLTCON0 register, the shift value for source B is
  8398. calculated from the lower four bits of x1.
  8399. ----------------------------------------------------------------------------
  8400. $DFF044 BLTAFWM      Source A First Word Mask
  8401. Status: *W         Agnus
  8402.    This register allows you to mask out the bits found on the left edge of
  8403. the bitplane area specified for blitter source A.  The first word of each
  8404. horizontal line is ANDed with the value stored in this register before it is
  8405. shifted, applied to the miniterm, and copied to memory.  For example, to
  8406. ensure that the two leftmost pixels of an area are always set to zero, store
  8407. a $3FFF in this register.  In descending mode, this and the following
  8408. register swap functions.
  8409.    Line Mode: In line mode, you should always store a $FFFF here.
  8410. Otherwise, your line may appear broken.
  8411. ----------------------------------------------------------------------------
  8412. $DFF046 BLTALWM      Source A Last Word Mask
  8413. Status: *W         Agnus
  8414.    This register allows you to mask out the bits found on the right edge of
  8415. the bitplane area specified for blitter source A.  The last word of each
  8416. horizontal line is ANDed with the value stored in this register before it is
  8417. shifted, applied to the miniterm, and copied to memory.  For example, to
  8418. ensure that the two rightmost pixels of an are are always set to zero, store
  8419. a $FFFC in this register.  In descending mode, this and the previous
  8420. register swap functions.
  8421.    Line mode: In line mode, you should always store a $FFFF here.
  8422. Otherwise, your line may appear broken.
  8423. ----------------------------------------------------------------------------
  8424. $DFF048 BLTCPTH      Blitter Source C Pointer
  8425. $DFF04A BLTCPTL
  8426. Status: *W         Agnus
  8427.    This is where you store the address of source C's bitmap data prior to
  8428. activating the blitter.  If you're blitting in ascending order, this address
  8429. should specify the starting address of your data.  If you're blitting in
  8430. descending order, this address should specify the ending address of your
  8431. data - the address of the last word of data.
  8432.    The low bit of this 32 bit register is always interpreted as zero, so
  8433. blitter bitmap data must begin on an even word boundary address.  (Using
  8434. BLTxFWM and BLTxLWM mask registers, however, you can specify bitmapped areas
  8435. with pixel accuracy.)  And, unless your Amiga has a 1MB Agnus, your data
  8436. cannot be located above $7FFF.    (1MB Agnus, use $FFFFF)
  8437.    Line mode: This register, as well as the BLTDPT register ($DFF054), must
  8438. contain the starting address of the line to be drawn.  (i.e. the address of
  8439. the word that contains the first point of the line.)  Using standard (x1,y1)
  8440. coordinates where (0,0) is the upper left corner of the bitplane, you can
  8441. calculate this address using the following formula:
  8442.    Address = Bitplane + (y1 * BytesPerLine) + (2 * (x1/16))
  8443. where Bitplane is the starting address of the destination bitplane and Bytes
  8444. Per Line is the width of the bitplane in bytes (number of pixels divided by
  8445. eight).  So, to draw a line in a 320 x 200 pixel bitplane found in memory at
  8446. 16384 starting at coordinate (10,20), you would store a 17185 into this
  8447. register because 16384+(20*(320/8))+(2*(10/16)) equals 17185.
  8448. ----------------------------------------------------------------------------
  8449. $DFF04C BLTBPTH      Blitter Source B Pointer
  8450. $DFF04E BLTBPTL
  8451. Status: *W         Agnus
  8452.    This is where you store the source B's bitmap data prior to activating
  8453. the blitter.  See register BLTCPT ($DFF048) for details.
  8454.    Line Mode: This register is not used in blitter line mode.
  8455. ----------------------------------------------------------------------------
  8456. $DFF050 BLTAPTH      Blitter Source A Pointer
  8457. $DFF052 BLTAPTL
  8458. Status: *W         Agnus
  8459.    This is where you store the address of source A's bitmap data prior to
  8460. activating the blitter.  See register BLTCPT ($DFF048) for details.
  8461.    Line Mode: Only the low word of this register, BLTAPTL, us used in line
  8462. mode.  Its value determines the slope of the line.  Use the following
  8463. formula to calculate the value of this register:
  8464.       BLTAPTL = (4 * dmin) - (2 * dmax)
  8465. where dmin equals min(abs(x1-x2),abs(y1-y2)) and dmax equals
  8466. max(abs(x1-x2),abs(y1-y2)).  If this formula produces a negative number, you
  8467. must write a 1 to the SIGN bit (6) of the BLTCON1 register at $DFF042.
  8468. ----------------------------------------------------------------------------
  8469. $DFF054 BLTDPTH      Blitter Destination Pointer
  8470. $DFF056 BLTDPTL
  8471. Status: *W         Agnus
  8472.    This is where you store the address of the chip RAM you're blitting into
  8473. (usually, this is a location within a bitmap).    If you're blitting in
  8474. ascending order, this address should reflect the starting address of your
  8475. data.  If you're blitting in descending order, it should reflect the ending
  8476. address of the destination data.  This register has the same limitations as
  8477. the BLTAPT-BLTCPT registers.  See location $DFF048 for details.
  8478.    Line Draw Mode: This register, as well as the BLTCPT register at $DFF048
  8479. must contain the starting address of the line to be drawn - that is, the
  8480. address of the word that contains the first point in the line.    See $DFF048
  8481. for more information.
  8482. ----------------------------------------------------------------------------
  8483. $DFF058 BLTSIZE      Blitter Start and Size
  8484. Status: *W         Agnus
  8485.              For Blitter Moves and Fills:
  8486.            0-5 W0-W5  Width of destination area in words
  8487.           6-15 H0-H9  Height of destination area in pixels
  8488.  
  8489.              For Line Mode:
  8490.              0          Set to 0
  8491.              1          Set to 1
  8492.            2-5          Set to 0
  8493.           6-15          Set to (dmax+1)
  8494.  
  8495.    The value stored in this register tells the blitter how large your
  8496. destination area is.  The lower six bits specify the width of this area in
  8497. words - pixels divided by 16.  If these bits are set to zero, the blitter
  8498. assumes a width of 64 words, or 1024 pixels.  The height of the area in
  8499. pixels goes into the upper nine bits.  A 0 specifies a height of 1024
  8500. pixels.  You can use the following formula to calculate the value of this
  8501. register:
  8502.       BLTSIZE = (Height * 64) + (Pixelwidth / 16)
  8503.    The maximum width or height is 1024 pixels.    The minimum width is 16
  8504. pixels and the minimum height is one pixel.
  8505.    Writing to this register activates the blitter.  As a result, it should
  8506. be the last blitter register that you write to.
  8507.    If you are shifting source A or source B data, you must specify a
  8508. horizontal width that is one greater than normal.
  8509.  
  8510.    Line Mode: In line mode, the lower six bits must hold the value 2 while
  8511. the upper 9 bits must hold the value of dmax + 1.  Use the following formula
  8512. to determine the value that you should store in this register:
  8513.       BLTSIZE = (dmax * 64) + 66
  8514. where dmax equals max(abs(x1-x2),abs(y1-y2)).
  8515.    Because writing to BLTSIZE turns on the blitter, it should be the last
  8516. register that you set.
  8517. ----------------------------------------------------------------------------
  8518. $DFF05A - $DFF05E    Currently Unused
  8519. ----------------------------------------------------------------------------
  8520. $DFF060 BLTCMOD      Blitter Source C Modulo
  8521. Status: *W         Agnus
  8522.    Whenever the blitter finishes writing data to the last word in a
  8523. horizontal line, the contents of this register are added to the BLTCPT
  8524. register so that it points to the start of the next line.  This allows the
  8525. blitter to copy areas within a bitmap that are smaller than the width of the
  8526. bitmap itself.    If you're copying an area that is the same width of the
  8527. bitplane it is contained in or if you're copying consecutive bytes in
  8528. memory, simply write a zero to this register.  Otherwise, this register
  8529. should contain the difference between the byte width of the bitplane
  8530. containing the area to be copied and the byte width of the area.  Here's a
  8531. formula for determining the value that should be stored in this register:
  8532.       BLTCMOD = (BitMapWidth / 8) - (2 * (AreaWidth / 16))
  8533. where BitMapWidth and AreaWidth are the pixel widths of the source bitmap
  8534. and the area to be copied respectively.  Note that this register specifies
  8535. width in bytes whereas the BLTSIZE register specifies width in words.  Also,
  8536. although this register reflects the bitmap's width in bytes, its low bit is
  8537. ignored, so the value here must specify an even number of bytes.
  8538.    With a separate BLTxMOD register for each source, it's possible to
  8539. combine the data from three bitmaps of different widths.
  8540.  
  8541.    Line Mode: For drawing lines, store the byte width (pixel width divided
  8542. by 8) of your bitmap in this register.
  8543. ----------------------------------------------------------------------------
  8544. $DFF062 BLTBMOD      Blitter Source B Modulo
  8545. Status: *W         Agnus
  8546.    Copy Mode: See BLTCMOD above.
  8547.  
  8548.    Line Mode: This register should contain the value 4 * dmin, where dmin
  8549. equals min(abs(x1-x2),abs(y1-y2)).
  8550. ----------------------------------------------------------------------------
  8551. $DFF064 BLTAMOD      Blitter Source A Modulo
  8552. Status: *W         Agnus
  8553.    Copy mode: See BLTCMOD above.
  8554.  
  8555.    Line Mode: This register should contain the value 4 * (dmin - dmax) with
  8556. dmin and dmax defined as above.
  8557. ----------------------------------------------------------------------------
  8558. $DFF066 BLTDMOD      Blitter Destination Modulo
  8559. Status: *W         Agnus
  8560.    Copy mode: See BLTCMOD above.
  8561.  
  8562.    Line Mode: For drawing lines, store the byte width (pixel width divided
  8563. by 8) of your bitmap in this register.    This is the same value you must
  8564. store in the BLTCMOD register.
  8565. ----------------------------------------------------------------------------
  8566. $DFF068 - $DFF06E    Currently Unused
  8567. ----------------------------------------------------------------------------
  8568. $DFF070 BLTCDAT      Blitter C Source Data
  8569. Status: *W         Agnus
  8570.    The blitter uses this register as the data register for blitter source C
  8571.  
  8572.    Line Mode: This register is not used in line mode.
  8573.  
  8574.    Blitter Data Register Notes: The blitter uses these registers as a
  8575. temporary holding place for data that is read from memory.  If a source's
  8576. DMA is enabled for a blitter operation, words are read from memory and then
  8577. stored in the corresponding BLTxDAT register.  Here the data is manipulated
  8578. according to the mask registers, the shift bits, the miniterm operation, and
  8579. then it is written to destination RAM.
  8580.    If a source's DMA is disabled, the data is not read from memory, but the
  8581. value found in the source's data register is still used to form the
  8582. blitter's output.  For this reason, it's a good idea to initialize the data
  8583. register of an unused source prior to starting the blitter.
  8584.    You can use the data registers to fill an area of memory with any word
  8585. long value.  Simply set up the blitter so that none of the data registers
  8586. have DMA enabled, select a miniterm of A, write the desired value into the
  8587. BLTADAT register, set up the remaining registers as usual, and activate the
  8588. blitter.
  8589.    If you plan to shift source A or B during a blitter operation, you must
  8590. be sure to initialize the shift bits prior to writing to the source's data
  8591. register.  Otherwise, the number written to this register will be shifteed
  8592. according to the old shift value.
  8593. ----------------------------------------------------------------------------
  8594. $DFF072 BLTBDAT      Blitter Source B Data
  8595. Status: *W         Agnus
  8596.    This is the data register for blitter source B.
  8597.  
  8598.    Line Mode: Store the bit pattern with which you wish you5r line to be
  8599. drawn in this register.  For normal solid lines, store a $FFFF here.  Other
  8600. values produce dotter or dashed lines.
  8601. ----------------------------------------------------------------------------
  8602. $DFF074 BLTADAT      Blitter Source A Data
  8603. Status: *W         Agnus
  8604.    This is the data register for blitter source A.
  8605.  
  8606.    Line Mode: This register should be initialized with the value of $8000
  8607. for line mode.
  8608. ----------------------------------------------------------------------------
  8609. $DFF076 - $DFF07C    Currently Unused
  8610. ----------------------------------------------------------------------------
  8611. $DFF07E DSKSYNC      Disk Sync Pattern
  8612. Status: *W         Paula
  8613.    Before reading data from a disk, it's often necessary to sync the
  8614. drive's heads on a particular bit pattern.  This register allows you to do
  8615. just that.
  8616.    When the WORDSYNC bit (10) in the ADKCON register ($DFF09E) is set, the
  8617. disk controller's DMA is enabled and the controller prepares to search the
  8618. disk for the sync pattern found in this register.  The disk controller
  8619. doesn't start searching until this register is written to.  When the sync
  8620. pattern is found, it is set to one for two or four usec (Depending on the
  8621. format selected: MFM or GCR) as soon as the sync pattern is located.
  8622. This event can also be used to trigger a level 6 interrupt.
  8623.    In MFM format (the disk format used by AmigaDos), the sync pattern should
  8624. be a value that is impossible to create using MFM data coding.    This way, it
  8625. can't be confused with actual data.  AmigaDos uses the number $4489 as its
  8626. sync pattern.  Here's how you might initiate the search for this value using
  8627. machine language:
  8628.  
  8629.    ADKCON equ $DFF09E
  8630.   DSKSYNC equ $DFF07E
  8631.    move.w #$8400,ADKCON
  8632.    move.w #$4489,DSKSYNC
  8633.  
  8634.    For more information on low-level disk access, see the CIA-B's PRB
  8635. register at $BFD100.
  8636. ----------------------------------------------------------------------------
  8637. Copper Registers:
  8638.  
  8639.    The copper is designed to free the 680x0 from display tasks.  It has
  8640. three instructions: WAIT, MOVE, and SKIP.  It doesn't seem like you can do
  8641. much with only three instructions, but by using a variety of tricks and
  8642. subterfuges, a copper list can perform loops, take over the blitter, and
  8643. even generate an interrupt for the 68000.
  8644.  
  8645.    WAIT.  Wait mimics a loop structure which waits for a certain condition
  8646. to occur.  Specifically, Wait waits for the x,y coordinates of the raster to
  8647. meet or exceed the coordinates you specify.  Thus, wait allows you to
  8648. synchronize actions with the video.  (i.e.: Color changes, raster
  8649. interrupts, etc.)  Since a typical copper list executes every time the
  8650. screen is drawn, the color change will be rock steady.
  8651.    The x,y coordinates are not simple pixel coordinates, but beam position
  8652. coordinates.  See the descriptions of VPOSR ($DFF004), VHPOSR ($DF006),
  8653. VPOSW ($DFF02a), and VHPOSW ($DFF02C).
  8654.    Here is what a Wait instruction looks like:
  8655.     0  Always set to 0
  8656.   1-7  horizontal compare enable bits
  8657.  8-14  vertical compare enable bits
  8658.    15  the blitter finished disable bit (usually 1)
  8659.    16  Always set to 1
  8660. 17-23  horizontal beam position
  8661. 24-31  vertical beam position
  8662.  
  8663.    Bits 1-7 describe which bits of the horizontal beam counter will be
  8664. compared with an x position for which you choose to wait.  Normally, you
  8665. should set all of these bits to one.
  8666.    Bits 8-14 describe the same for the y position.
  8667.    Bit 15 should normally be set to one.  If you set it to zero, the copper
  8668. Wait instruction will wait until the beam position meets or exceeds the
  8669. given position and the blitter has finished its operation.
  8670.    Bits 17-23 indicate the horizontal beam position for which the wait is
  8671. waiting.  Note that bits 1-7 are used to decide which bits are actually used
  8672. for the comparison.
  8673.    Bits 24-31 indicate the same for the vertical - uses 8-14.
  8674.  
  8675.    Because the horizontal beam position is maintained to a resolution of two
  8676. low resolution pixels, and because the LSB of that position is not used in
  8677. wait comparison, WAIT has a resolution of four lo-res or 8 hi-res pixels.
  8678.    One potential problem with wait is that you cannot directly wait for a
  8679. line greater than 255.    To do this, wait for 255.  Then, wait for line
  8680. number x-255.
  8681.    A version of the wait command is used to end copper lists.  The command
  8682. code is $FFFFFFFE.  (i.e. wait for y=255, x=254)  The loop seems to be
  8683. infinite, and in fact is, however note that the copper list is reset DURING
  8684. EVERY VERTICAL BLANKING PERIOD!
  8685.  
  8686.    MOVE.  The Move instruction transfers data to a hardware register.  The
  8687. instruction can store data into any register with an address of $80 or more.
  8688.  Note that the register base of $DFF000 is implicit - it is not included in
  8689. the instruction.  If the copper danger bit, CDANG is set ($DFF02E bit 1),
  8690. the instruction can store data into any register with an address of $40 or
  8691. more.  Unless you need the copper to write to the blitter registers, you
  8692. should keep CDANG set to zero.
  8693.    With the Move instruction, you can set up bitplane pointers, sprite
  8694. pointers, color registers, and so on.  A complete, useful copper list will
  8695. have MANY move instructions because there are several DMA registers that
  8696. have to be reset every frame.  For example, the bitplane registers must be
  8697. reset to keep them from continuing where they left off.  Otherwise, you'd
  8698. see all of chip RAM rushing through the screen at great speed.
  8699.    Keep in mind that Move is not instantaneous.  Two Move instructions will
  8700. be separated by four low resolution pixels.
  8701.    Here is the format for the Move command:
  8702.  0-15 Data
  8703.    16 Set to Zero
  8704. 17-24 Register address
  8705. 25-31 Unused - set to zero
  8706.  
  8707.    Bits 0-15 are a word of data that you wish to transfer to the hardware
  8708. register.  If you want to transfer a long word, you must use 2 move
  8709. instructions.
  8710.    Bits 17-24 specify the offset from $DFF000 which you would like to
  8711. modify.  The CDANG bit of the COPCON register determines which values are
  8712. considered legal by the copper.
  8713.  
  8714.    SKIP.  Most copper lists are composed only of WAIT and MOVE instructions.
  8715. The Skip command allows for conditional branching.  It is a command that has
  8716. quite a bit of potential that has rarely been tapped.
  8717.    Skip is a close relative of WAIT.  As is the case with Wait, Skip decides
  8718. what to do based on the position of the video beam.  Instead of waiting for
  8719. a beam position though, it alters copper list program flow based on the beam
  8720. position.
  8721.    The Skip instruction looks like this:
  8722.     0 Set to 1
  8723.   1-7 horizontal compare enable bits
  8724.  8-14 vertical compare enable bits
  8725.    15 blitter-finished-disable bit
  8726.    16 set to 1
  8727. 17-23 horizontal beam position
  8728. 24-31 vertical position
  8729.  
  8730.    The Skip command skips the instruction that immediately follows it if the
  8731. beam counter meets or exceeds the value you specify.  The instruction that
  8732. follows skip is typically a strobe to the COPJMP1 or COPJMP2 registers.
  8733. Writing to these registers causes a jump to the address in the COP1LC or
  8734. COP2LC registers, respectively.
  8735.  
  8736. ----------------------------------------------------------------------------
  8737. $DFF080 COP1LCH      Copper Program Counter 1
  8738. $DFF082 COP1LCL
  8739. $DFF084 COP2LCH      Copper Program Counter 2
  8740. $DFF086 COP2LCL
  8741. Status: *W         Agnus
  8742.    The above registers are the copper location registers.  COP1LC is the
  8743. default copper PC.  Either of the above are loaded when the COPJMP registers
  8744. are strobed.
  8745. ----------------------------------------------------------------------------
  8746. $DFF088 COPJMP1      Copper Jump Strobes
  8747. $DFF08A COPJMP2
  8748. Status: Strobe         Agnus
  8749.    These locations, when written to, cause the respective copper PC (1 or 2)
  8750. to be loaded into the copper program counter.  The operation system strobes
  8751. COPJMP1 during a vertical blank interrupt.
  8752. ----------------------------------------------------------------------------
  8753. $DFF08C COPINS         Copper Instruction Identity
  8754. Status: *W         Agnus
  8755.    This location is of questionable use to the programmer.  It is written to
  8756. by the hardware and is used to identify the current copper instruction.
  8757. ----------------------------------------------------------------------------
  8758. Location Range: $DFF08E - $DFF094   Position of the screen display
  8759.    These four registers define the position of the Amiga's screen.  DIWSTRT
  8760. (Display Window Start) defines the screen's upper left corner while DIWSTOP
  8761. (Display Window Stop) defines the window's lower right corner.  Anything
  8762. outside of this area is considered border area.
  8763.    Before explaining how the next two registers, DDFSTRT and DDFSTOP, affect
  8764. the display, a brief explanation of bitplane DMA is in order.  Bitplane data
  8765. describes what to draw, but it's the responsibility of bitplane DMA to grab
  8766. that data from chip RAM and give it to the video hardware via registers
  8767. BPL1DAT - BPL6DAT ($DFF110 - $DFF11A).    Shortly after the video hardware
  8768. receives new data, it draws that data at the cirrent video beam position.
  8769. So where graphics appear onscreen is determined by when bitplane DMA gives
  8770. the video hardware its information.  (Anytime bitplane DMA is inactive and
  8771. the BPLxDAT registers are empty, the Amiga displays the color specified by
  8772. the COLOR00 register.)
  8773.    Vertically, bitplane DMA starts the moment it reaches the Y coordinate
  8774. found in DIWSTOP.  Horizontal start and stop locations are a bit more
  8775. complicated, however, as the computer needs some more time before it can
  8776. display fetched data.  On a lo-res display, it takes 8.5 color clocks.    (A
  8777. color clock is equal to one memory access cycle, ehich is approximately 280
  8778. nsec in duration.  The Amiga can output two lo-res pixels per color clock.)
  8779.    Each horizontal line on the computer screen can be thought of as a time
  8780. line.  Where along this line bitplane DMA is allowed to start is determined
  8781. by the DDFSTRT (Display Data Fetch Start) register.  The DDFSTOP (Display
  8782. Data Fetch Stop) register tells the Amiga when the bitplane DMA should stop.
  8783.  As you can imagine, unless these registers correspond with the horizontal
  8784. coordinates found in the DIW registers, your display will appear cropped
  8785. and/or garbled.
  8786.    Finding the proper value for the DDFSTRT based on the horizontal
  8787. coordinate found in DIWSTRT is easy.  Because the DIWSTRT register specifies
  8788. coordinates in lo-res pixels, and the DDFSTRT register is accurate to only
  8789. two lo-res pixels, you must first divide DIWSTRT's horizontal coordinate by
  8790. two; then, simply subtract the number of color clocks that you need - 4.5
  8791. for hi-res, and 8,5 for lo-res.  Here oare the formulae you should use to
  8792. calculate the correct value for the DDFSTRT register:
  8793.       DDFSTRT = HSTART / 2 - 4.5  for hi-res screens, and
  8794.       DDFSTRT = HSTART / 2 - 8.5  for lo-res.
  8795. HSTART refers to bits 0-7 of the DIWSTRT register (its horizontal
  8796. coordinate).
  8797.    Since the default value for HSTART is $81, DDFSTRT defaults to $3C for
  8798. hi-res, and $38 for lo-res.
  8799.    Calculating the value for DDFSTOP is also easy.  Its value depends on the
  8800. screen's width:
  8801.       DDFSTOP = DDFSTRT + (4 * ((Width / 16) - 1))  for hi-res screens, and
  8802.       DDFSTOP = DDFSTRT + (* * ((Width / 16) - 1))  for lo-res.
  8803. Width is the width of the screen in pixels.  So, on a standard 640 pixel
  8804. hi-res screen, where DDFSTRT equals $3C, DDFSTOP should be set to $D4.
  8805. ----------------------------------------------------------------------------
  8806. $DFF08E DIWSTRT      Display Window Start
  8807. Status: *W         Agnus
  8808.            0-7 HSTART Horizontal coord. of upper left corner
  8809.           8-15 VSTART Vertical coordinate of lower right corner
  8810. Notes: Bits 0-7 default to $81, and 8-15 default to $2C.
  8811. ----------------------------------------------------------------------------
  8812. $DFF090 DIWSTOP      Display Window Stop
  8813. Status: *W         Agnus
  8814.            0-7 HSTOP  Horizontal coord. of lower right corner
  8815.           8-15 VSTOP  Vertical coord. of lower right corner.
  8816. Notes: For bits 0-7, the minimum HSTOP position in $100, which is 1/3 across
  8817. the screen.  The value stored here represents an offset from this position.
  8818. So, the actual horizontal coordinate of the lower right corner of the screen
  8819. is $100 PLUS HSTOP!  You can think of HSTOP as being a nine bit register
  8820. with bit 8 always set.    The Default is $C1, which specifies a value of $1C1.
  8821.    For bits 8-15, these bits hold the vertical coordinate of the lower right
  8822. corner of the screen.  The minimum VSTOP position in $80.  If the value here
  8823. is less than $80, VSTOP equals $100 PLUS your VSTOP value.  Simply put,
  8824. whatever the state of bit 8 is, bit nine will be opposite!  The default for
  8825. NTSC is $F4, and the PAL default is $2C which actually is $12C.  VSTOP
  8826. always specifies the vertical position in noninterlace lines, no matter what
  8827. mode the computer is in.
  8828. ----------------------------------------------------------------------------
  8829. $DFF092 DDFSTRT      Display Data Fetch Start
  8830. Status: *W         Agnus
  8831.    This register specifies the horizontal position that the video beam must
  8832. reach in order for bitplane DMA to start.  It's value depends on your screen
  8833. resolution, and what you store in the HSTART bits (0-7) in the DIWSTRT
  8834. register at $DFF09E.
  8835.    In hi-res, only bits 2-7 are active.  (specifies an even multiple of 4)
  8836. In lo-res, only bits 3-7 are active (an even multiple of 8).  Because of
  8837. certain hardware limitations, do not use DDFSTRT values less than $18.    Ans,
  8838. because sprite DMA relies on color clocks that occur during raster positions
  8839. $16-$34, using DDFSTRT values below $38 will disable certain sprites.  The
  8840. lower the number, the more sprites are disabled.  Higher numbered sprites
  8841. will be disabled first.
  8842. ----------------------------------------------------------------------------
  8843. $DFF094 DDFSTOP      Display Data Fetch Stop
  8844. Status: *W         Agnus
  8845.    This register specifies the horizontal position the video beam must reach
  8846. in order for bitplane DMA to stop.  The bits used are the same as for
  8847. DDFSTRT.  Because of certain hardware limitations, do not use values greater
  8848. than $D8.
  8849. ----------------------------------------------------------------------------
  8850. $DFF096 DMACON         DMA Control
  8851. Status: *W         Angus/Denise/Paula
  8852.    This is the write register for DMACONR.  The only difference is that
  8853. SET/CLR is active.  Note that activating audio channel DMA starts the sound
  8854. on the specified channel.  (See DMACONR at $DFF002)
  8855. ----------------------------------------------------------------------------
  8856. $DFF098 CLXCON         Collision Control
  8857. Status: *W         Denise
  8858.              0 MVP1   Match value for bitplane 1 collisions
  8859.              1 MVP2                   2
  8860.              2 MVP3                   3
  8861.              3 MVP4                   4
  8862.              4 MVP5                   5
  8863.              5 MVP6                   6
  8864.              6 ENBP1  Enable collision detection for bitplane 1
  8865.              7 ENBP2                          2
  8866.              8 ENBP3                          3
  8867.              9 ENBP4                          4
  8868.             10 ENBP5                          5
  8869.             11 ENBP6                          6
  8870.             12 ENSP1  Enable collision detection for sprite 1
  8871.             13 ENSP3                        3
  8872.             14 ENSP5                        5
  8873.             15 ENSP7                        7
  8874.  
  8875.    The Amiga can detect three types of graphic collisions: sprite - sprite,
  8876. sprite - bitplane, and bitplane - bitplane.  The match value in bits 0-5
  8877. determine exactly what constitutes a collision: either a 0 or 1.
  8878.    Through creative use of 0-5 and 6-11, you can specify that collision
  8879. takes place with only a certain color or within a range of colors.
  8880.    Bits 6-11.  These bits determine which bit planes are used in collision
  8881. detection.  Oddly, the Amiga always seems to think that a bitplane collision
  8882. is taking place when all of these bits are set to zero.
  8883.    Bits 12-15.    Setting these bits allows you to check for collisions
  8884. between the specified sprite, and the next lower one.
  8885. ----------------------------------------------------------------------------
  8886. $DFF09A INTENA         Interrupt Enable
  8887. Status: *W         Paula
  8888.    This is the write register for INTENAR at $DFF01C.  Note that SET/CLR is
  8889. active, and that you must CLEAR the appropriate bit after servicing the
  8890. interrupt!
  8891. ----------------------------------------------------------------------------
  8892. Location Range: $DFF09E - $DFF0DE   Audio Registers
  8893.    Once you have a waveform sample loaded into chip RAM, turning that data
  8894. into sound is relatively simple.  Just tell the computer where is, the
  8895. length in words, how fast to play the sound, set the volume, and then signal
  8896. that DMA for the desired sound.  The Amiga will continue to play and repeat
  8897. your sound until you tell it to stop.
  8898. ----------------------------------------------------------------------------
  8899. $DFF09E ADKCON         Audio/Disk Control (see ADKCONR at $DFF010)
  8900. Status: *W         Paula
  8901.    Notes on bit 12: MFM vs. GCR formatting:
  8902.    Briefing put, MFM format inserts clock bits between each data bit written
  8903. to disk.  If two consecutive data bits are zero, a 1 clock bit is inserted
  8904. between them.  If either of two consecutive bits is a 1, a 0 clock pulse in
  8905. put between them.  Using this coding method, the amount of data written to a
  8906. disk is doubled, but the accuracy of reading the data is increased.  You
  8907. see, the disk controller has an easier time synchronizing on data that
  8908. changes states rather than data that repeats such as a long string of 1's or
  8909. 0's.
  8910.    GCR format handles synchronization problems by encoding every four bits
  8911. od data into five bits.  The result is a binary number with no more than two
  8912. adjacent 0 bits and no more than eight adjacent 1 bits.  (This format is
  8913. used on the Commodore 1541 drives on the C64.)    The following table shows
  8914. the 5 bit GCR equivalents of the binary numbers 0000-1111.
  8915.       Binary   GCR
  8916.       ------   ---
  8917.        0000   01010    Note that with GCR, no more than 8 on bits or
  8918.        0001   01011    2 off bits are possible.
  8919.        0010   10010
  8920.        0011   10011
  8921.        0100   01110
  8922.        0101   01111
  8923.        0110   10110
  8924.        0111   10111
  8925.        1000   01001
  8926.        1001   11001
  8927.        1010   11010
  8928.        1011   11011
  8929.        1100   01101
  8930.        1101   11101
  8931.        1110   11110
  8932.        1111   10101
  8933.  
  8934.    Notes on bit 13: These set the disk disk controller's precompensation
  8935. time, which directly affects the density of the data written to disk.  The
  8936. faster the precompensation time, the higher the density.  With AmigaDos,
  8937. density is highest on the inside tracks, probably due to the fact that these
  8938. is less physical space for these tracks.
  8939. ----------------------------------------------------------------------------
  8940. $DFF0A0 AUD0LCH      Channel 0 Waveform Address
  8941. $DFF0A2 AUD0LCL
  8942. Status: *W         Agnus
  8943.    The low byte of this register is always interpreted as zero, so your data
  8944. must begin on a word boundary.    For a 512K Agnus, max address is $7FFFF, and
  8945. for a 1MB Agnus, it is $FFFFF.
  8946. ----------------------------------------------------------------------------
  8947. $DFF0A4 AUD0LEN      Channel 0 Waveform Length
  8948. Status: *W         Paula
  8949.    The length of your data in words is stored here.  So, your data must be
  8950. an even number of bytes, and may not exceed 131,070 bytes.  (i.e. 65536
  8951. times two.)
  8952.    However, it is possible to play waveforms longer than 131,070 bytes due
  8953. to the fact that the Amiga buffers the contents of the AUDxLC and AUDxLEN
  8954. registers by using backup registers.  So, you may change the AUDxLC and
  8955. AUDxLEN registers while the Amiga is playing a sound, and when it is
  8956. finished, it will start with the new data!  Any of the Amiga's audio
  8957. channels can cause a level 4 interrupt just before your sound starts a new
  8958. waveform cycle.  When this interrupt occurs, you know it's safe to change
  8959. the registers.    One warning however: Interrupts caused by high-frequency
  8960. waveforms can occur quite rapidly.  Even more rapidly than the operating
  8961. system can keep up!  It's best to leave the audio interrupts alone, unless
  8962. you actually need them.  Just wait a little while before changing the AUDxLC
  8963. and AUDxLEN registers and all will work fine.
  8964. ----------------------------------------------------------------------------
  8965. $DFF0A6 AUD0PER      Channel 0 Period
  8966. Status: *W         Paula
  8967.    A sound's frequency is determined by the value stored here.  The lowest
  8968. value you should use is 124, since this is about as fast as the Amiga can
  8969. go.  The highest value is 65535.
  8970.    How you determine the period depends on how you get your waveform data.
  8971. If you use a digitizer and the frequency is in Samples-per-second, use this
  8972. equation:  AUDxPER = 3579546 / Samples-per-second
  8973.    If you have a group of data that you want played as an "instrument", use
  8974. this:       AUDxPER = 3579546 / (Bytes-Length * Frequency to be played)
  8975.    Of course, the frequency for a given note may be calculated by the old
  8976. standby:   Frequency = Base * 2 ^ (1/12)
  8977.    Which calculates the frequency for the next note once given a frequency.
  8978. Middle C comes in at 261.4 Hz.
  8979.    If you don't want your sound to repeat, you should consider one more
  8980. thing: when to stop the sound.    You see, the faster you play the sound, the
  8981. faster its going to finish.  To figure out how long to let it play, use the
  8982. following equation:
  8983.        uSec = .279365 * Period * Length
  8984. Where uSec, is of course, the time in microseconds it takes to play your
  8985. sound once.
  8986. ----------------------------------------------------------------------------
  8987. $DFF0A8 AUD0VAL      Channel 0 Volume
  8988. Status: *W         Paula
  8989.    This volume register can accept values between 0 and 64, where 0 is the
  8990. lowest setting (at -infinity dB), and 64 is loudest (at -0 dB).
  8991. ----------------------------------------------------------------------------
  8992. $DFF0AA AUD0DAT      Channel 0 Data
  8993. Status: *W         Paula
  8994.    This is the data buffer used by channel 0.  It's purpose is to output
  8995. sounds at a rate higher than the DMA can.  To use it, you must disable
  8996. channel 0 DMA and shove the data in onw word at a time.
  8997. ----------------------------------------------------------------------------
  8998. Location Range: $DFF0AC - $DFF0AE   Unused
  8999.    The Amiga reserves enough space for eight word-long addresses for each
  9000. channel, but uses only six.  The remaining addresses are unused.
  9001. ----------------------------------------------------------------------------
  9002. $DFF0B0/2   AUD1LCH/L     These registers function exactly the same as
  9003. $DFF0B4     AUD1LEN     channel 0's.  To Find channel 2's, add $20 to
  9004. $DFF0B6     AUD1PER     the AUD0xxx value, and $30 for channel 3.
  9005. $DFF0B8     AUD1VOL
  9006. $DFF0BA     AUD1DAT
  9007. $DFF0BC/E   UNUSED
  9008. ----------------------------------------------------------------------------
  9009. Location Range: $DFF0E0 - $DFF0F6   Bitplane pointer registers
  9010. Status: *W    Agnus
  9011.    These registers point to the current word of data that is being displayed
  9012. from each bitplane.  They are set up by the programmer, but increment as
  9013. each word of data is fetched from memory.  Therefore, these registers must
  9014. be reset for each screen.  This is usually done by the copper list, but may
  9015. also be written directly to by the programmer during the vertical blank
  9016. interrupt.  The initial value stored here should be the starting address of
  9017. the bitplane.  The value stored here must begin on a word boundary, and all
  9018. notes about 512K / 1MB Agnus chips apply here.
  9019.  
  9020. $DFF0E0 BPL1PTH/L Bitplane pointers for bitplanes 1-6... 32 bits long
  9021. $DFF0E4 BPL2PTH/L with bit zero ignored.
  9022. $DFF0E8 BPL3PTH/L
  9023. $DFF0EC BPL4PTH/L
  9024. $DFF0F0 BPL5PTH/L
  9025. $DFF0F4 BLT6PTH/L
  9026. ----------------------------------------------------------------------------
  9027. Location Range: $DFF0F8 - $DFF0FE   Currently Unused.
  9028. ----------------------------------------------------------------------------
  9029. Location Range: $DFF100 - $DFF104   Bitplane Control Registers
  9030.    These three register control the modes of the Amiga video display.
  9031. Within the bits of these registers are the means of creating just about any
  9032. Amiga screen possible.    BPLCON0 ($DFF100) controls how the pixels are
  9033. displayed.  Genlocking, interlace, dual playfield mode, HAM, Extra Half
  9034. Brite, and Hi-Res are all among its domain.  BPLCON1 ($DFF102) controls the
  9035. hardware smooth scrolling of the Amiga.  BPLCON2 ($DFF104) is the priority
  9036. register which determines how the playfield and sprites will interact.    A
  9037. few terms will be described to facilitate the discussion of these registers:
  9038.  
  9039.    Dual Playfield Mode: In this mode, the odd numbered bitplanes are grouped
  9040. into one playfield (1), and the even numbered bitplanes into the other. (2)
  9041. One playfield has priority over the other, which means that the backgroup's
  9042. playfield shows through only when the foreground's pixels color is 0.
  9043.    Extra HalfBrite: In EHB, pixels may have any value in the range of 0-63.
  9044. Pixels in the range of 0-31 use the normal 32 color registers.    Pixels 32-63
  9045. use the lower 32 color registers with the RGB values each shifter one bit
  9046. right.    Thus, 32-63 are half as bright.
  9047.    Genlock: This is a method of combining computer graphics with an external
  9048. video source.  The external source shows through where pixel color 0 is.
  9049.    Hold and Modify (HAM): In HAM mode, 16 color registers (4 bits) are used
  9050. normally.  In 5 bitplane HAM mode, a bit set in the 5th bitplane signifies
  9051. that the pixel should use the color of the pixel immediately to the left,
  9052. but with the blue value corresponding to the value of the lower four
  9053. bitplanes.  In 6 bitplane mode, the bits in the 5th and 6th bitplanes are
  9054. used to specify whether the lower sixteen color registers should be used
  9055. normally, or whether the pixel should be based on the pixel immediately to
  9056. the left, with the red, green, or blue intensity altered.  HAM images are
  9057. the most photographic available on the Amiga.  Six bitplane HAM is typical,
  9058. with five bitplane HAM a rarity.
  9059.    Interlace: This is a method of doubling vertical resolution by displaying
  9060. alternating lines on alternating scans.  See VPOSR at $DFF004.
  9061.    Playfield: This is the name for the non-sprite graphics that appear on
  9062. the screen as a result of bitplane DMA.  The name is a carryover from the
  9063. old Atari VCS.    (gasp!)
  9064. ----------------------------------------------------------------------------
  9065. $DFF100 BPLCON0      Bitplane Control Register 0
  9066. Status: *W         Agnus/Denise
  9067.              0 UNUSED
  9068.              1 ERSY   External sync.  (1 = external, genlocked
  9069.                   0 = internal, normal)
  9070.              2 LACE   1 = interlace enable
  9071.              3 LPEN   1 = light pen enable
  9072.            4-7 UNUSED
  9073.              8 GAUD   1 = Genlock audio enable
  9074.              9 COLOR  1 = Composite color enable on Amiga 1000,
  9075.                   0 = Monochrome display.
  9076.             10 DBLPF  1 = Double (dual) playfield mode
  9077.             11 HOMOD  1 = HAM active
  9078.          12-14 BPU    Number of bitplanes used.  Zero = no bitplanes
  9079.                   You cannot use more than 4 for hi-res, and six
  9080.                   activates EHB mode.
  9081.             15 HIRES  1 = Hi-res mode  0 = Lo-res mode.
  9082.  
  9083. Notes on bit 8: It has been alleged that audio data can be multiplexed on
  9084. the BKGD pen during vertical blanking, and bit 8 enables this feature.    In
  9085. reality, however, this bit simply goes out on the pixel switch ZD during
  9086. blanking periods.
  9087. ----------------------------------------------------------------------------
  9088. $DFF102 BPLCON1      Bitplane Control Register 1
  9089. Status: *W         Denise
  9090.            0-3 PF1H   Playfield 1 horizontal scroll
  9091.            4-7 PF2H   Playfield 2 horizontal scroll
  9092.    This register allows you to fine scroll the screen horizontally.
  9093. Vertical scrolling is trivial.    Simply increment or decrement the starting
  9094. address of each bitplane by the width of a screen line in bytes.  Horizontal
  9095. scrolling is trickier.    You can perform a coarse 16 pixel scroll by simply
  9096. incrementing or decrementing the starting address of the bitplane pointers
  9097. by one word, but to scroll at the pixel level, use this register.
  9098.    In lo-res, the scrolling is in one pixel increments, and in hi-res, it is
  9099. two pixels.  To set up a screen for horizontal scrolling, the screen must be
  9100. one word wider than normal.  Do, you must add 2 to DDFSTRT's ($DFF030)
  9101. normal value.  You must set the modulo registers (BPLxMOD $DFF108) to the
  9102. number of "extra" bytes in each line (those that would not exist if you
  9103. weren't doing horizontal scrolling) minus two.  For example, if you're
  9104. displaying 40 bytes of an 80 byte wide screen, place the number 38 into the
  9105. appropriate BPLxMOD register.
  9106. ----------------------------------------------------------------------------
  9107. $DFF104 BPLCON2      Bitplane Control Register 2
  9108. Status: *W         Denise
  9109.    This register allows you to determine priorities between the graphic
  9110. elements that make up an Amiga screen, namely the eight sprites and two
  9111. playfields.
  9112.  
  9113.    0-2 PF1P    Playfield 1 vs. sprite priority
  9114.    3-5 PF2P    Playfield 2 vs. sprite priority
  9115.      6 PF2PRI  Playfield 1 vs. playfield 2 priority (1 = 2 in front,
  9116.            0 = 1 in front.)
  9117.  
  9118. Notes: Bits 0-5 allow you to specify whether sprites should pass in front of
  9119. or behind a given set of bitplanes.  The table below shows the allowable
  9120. values.
  9121.  
  9122.    bit 2    bit 1    bit 0    (for playfield 1)
  9123.    bit 5    bit 4    bit 3    (for playfield 2)
  9124.      0          0        0      Playfield has top priority
  9125.      0          0        1      Playfield appears behind sprites 0-1
  9126.      0          1        0      Playfield appears behind sprites 0-3
  9127.      0          1        1      Playfield appears behind sprites 0-5
  9128.      1          0        0      Playfield appears behind all sprites
  9129. ----------------------------------------------------------------------------
  9130. $DFF106          Zilch - Unused
  9131. ----------------------------------------------------------------------------
  9132. $DFF108 BPL1MOD      Bitplane Modulo 1
  9133. $DFF10A BPL2MOD      Bitplane Modulo 2
  9134. Status: *W         Agnus
  9135.    These registers control how many bytes are added to the bitplane pointers
  9136. at the end of a video line.  Normally, the value is zero.  When the number
  9137. is greater than zero, you have an undisplayed segment of the screen to the
  9138. right of the visible area.  You can bring this area into view by
  9139. incrementing the bitplane pointers, and modifying the smooth scroll
  9140. register BPLCON1 at $DFF102.
  9141.    As an example, suppose the virtual screen you have is 80 bytes wide, by
  9142. the visible screen is 40.  You'll need to specify 40 as the modulo.
  9143.    There are two modulo registers, one for each playfield.  Unless you are
  9144. using dual playfield mode, both of these registers should be set to the same
  9145. value.    Note that the lowest bit is ignored, thus these registers must be
  9146. set to an even value.
  9147. ----------------------------------------------------------------------------
  9148. Location Range $DFF10C - $DFF10E    Currently Unused.
  9149. ----------------------------------------------------------------------------
  9150. Location Range $DFF110 - $DFF11A    Bitplane Data Registers
  9151.    The Amiga hardware is currently able to display six bitplanes.  If you
  9152. look carefully, however, there are gaps that would allow two extra bitplanes
  9153. to be inserted.  These registers are typically written to by the bitplane
  9154. DMA, but they may also be written to by the programmer directly.  The
  9155. parallel data from the six bitplanes is shifted out the left and converted
  9156. to a color.  BPL1DAT is the trigger register.  That means that you should
  9157. write to BPL2DAT - BPL6DAT first, then write to BPL1DAT to trigger the
  9158. serial conversion.
  9159.  
  9160. $DFF110 BPL1DAT   Bitplane DMA trigger.  Color Weight = 1
  9161. $DFF112 BPL2DAT   Weight = 2
  9162. $DFF114 BPL3DAT   Weight = 4
  9163. $DFF116 BPL4DAT   Weight = 8
  9164. $DFF118 BPL5DAT   Weight = 16
  9165. $DFF11A BPL6DAT   Weight = 32 (i.e. HAM / EHB)
  9166. ----------------------------------------------------------------------------
  9167. Location Range $DFF11C - $DFF11E    Currently Unused.
  9168. ----------------------------------------------------------------------------
  9169. Location Range $DFF120 - $DFF17E    Sprite Registers
  9170.    The Amiga is known for the animation capabilities of the blitter, but it
  9171. also has powerful sprite hardware.  Sprites have some advantages over the
  9172. blitter.  Whereas the blitter must render its images to display memory,
  9173. sprites are rendered in a separate area of memory.
  9174.    There are eight sprites.  Each sprite is 16 pixels wide and an arbitrary
  9175. size high.  The pixels are lo-res, even when displayed in hi-res or
  9176. interlaced mode.  Each pixels can be one of three colors or transparent.
  9177.    Sprites 0 and 1 share color registers 17 - 19.  Sprites 2 and 3 share
  9178. 21-23, 4 and 5 share 25-27, and 6 and 7 share 29 through 31.  If your screen
  9179. uses 4 bitplanes or less, you won't have to worry about sprites sharing the
  9180. color registers with the playfield.  Otherwise... you'll have to plan colors
  9181. carefully.
  9182.    Note that the lower the sprite number, the higher its priority on the
  9183. screen.  Sprite priorities relative to the playfield can be assigned.  See
  9184. the bitplane control registers $DFF100 - $DFF106.
  9185. ----------------------------------------------------------------------------
  9186. $DFF120 SPR0PTH     Sprite Pointer 0
  9187. $DFF122 SPR0PTL
  9188. Status: *W        Agnus
  9189.    This register holds the address of the Sprite 0 DMA data.  The address
  9190. must be in chip RAM.  This register acts as a DMA counter, so you must
  9191. initialize it during every vertical blank via the copper list or within a
  9192. vertical blank interrupt server.
  9193.    The address which you set to this register should contain valid sprite
  9194. data in chip RAM.  Use this format (each value is 32 bits):
  9195.  
  9196.       Sprite Control Value
  9197.       Image data for line 1
  9198.       Image data for line 2
  9199.       .....................
  9200.       Image data for last line
  9201.  
  9202.    Repeat this format for each occurrance of the sprite on the screen.    For
  9203. instance, you might have the same sprite engine used in three different
  9204. vertical areas of the screen.  In this case, you'd have the above format
  9205. three times.  At the end of the data, store a $00000000.
  9206.    Here is a sample adapted from the Amiga Hardware Reference Manual:
  9207.       SPRITE:
  9208.      DC.L  $6D607200   ; VSTART, HSTART, and VSTOP
  9209.      DC.L  $099007E0   ; Sprite data... $6D
  9210.      DC.L  $13C80FF0   ;            $6E
  9211.      DC.L  $23C41FF8   ;            $70
  9212.      DC.L  $13C80FF0   ;            $71
  9213.      DC.L  $099007E0   ;            $72
  9214.      DC.L  $00000000   ; End of structure.
  9215.  
  9216.    The Amiga is often said to have reusable sprite engines.  This means that
  9217. the Amiga can display the same sprite in several different places.  There is
  9218. one significant limitation to this ability: You must ensure that there is at
  9219. least one blank line vertically between the two instances of the same
  9220. sprite.  For example, if you have a sprite that stops displaying on line 25,
  9221. you may display a second one on line 27 or greater.
  9222. ----------------------------------------------------------------------------
  9223. $DFF124 SPR1PTH/L Sprite Pointers 1-7
  9224. $DFF128 SPR2PTH/L
  9225. $DFF12C SPR3PTH/L
  9226. $DFF130 SPR4PTH/L
  9227. $DFF134 SPR5PTH/L
  9228. $DFF138 SPR6PTH/L
  9229. $DFF13C SPR7PTH/L
  9230. ----------------------------------------------------------------------------
  9231. $DFF140 SPR0POS     Sprite Position 0 & Control 0
  9232. $DFF142 SPR0CTL
  9233. Status: *W        Agnus/Denise
  9234.    These two 16-bit registers can be thought of as a single 32 bit register
  9235. which holds information about how sprite 0 is to be displayed.    Info
  9236. included is vertical and horizontal starting locations, vertical stopping
  9237. location, and whether the sprite should be attached to its companion (0 and
  9238. 1, 2 and 3, 4 and 5, 6 and 7).
  9239.    The sprite control value consists of the following bits, the number of
  9240. which should be stored in the:
  9241.             0 HSTART       lowest bit
  9242.             1 VSTOP        highest bit
  9243.             2 VSTART       highest bit
  9244.               3-6 Always 0
  9245.             7 ATTACHMENT   1 = attached, 0 = not
  9246.              8-15 VSTOP        lowest 8 bits
  9247.             16-23 HSTART       highest 8 bits
  9248.             24-31 VSTART       lowest 8 bits
  9249.  
  9250.    The HSTART value is your sprite's intended horizontal position.
  9251. Typically, the horizontal position 0 is 64 pixels to the left of the screen.
  9252.  This number can change depending on your preferences settings.  Suppose
  9253. that you want to position a sprite at the horizontal position which
  9254. corresponds to pixel 10.  In this case, add 10 + 64, to get 74.  Place 74 in
  9255. HSTART.  If you're setting up your own copper list, you'll know the value to
  9256. add to your desired offset.  If you're using a screen set up by the screen,
  9257. you can find the offset in the View structure.
  9258.    The VSTART value is your sprite's intended vertical position.  Typically,
  9259. the vertical position is 0-44 pixels above the top line of the screen.    This
  9260. number can change depending on your preferences settings.  Suppose you want
  9261. to position a sprite at the vertical position that corresponds with pixel
  9262. position 12.  Simply add 12 + 44 to get 56.  Place 56 in VSTART.
  9263.    The VSTOP value is the line on which you want your sprite to stop
  9264. displaying.  Simply add the height of the sprite to VSTART to get this
  9265. value.
  9266.    The register's attachment bit (7) is ingored in even numbered sprites.
  9267. When you attach two sprites, set HSTART, VSTART, and VSTOP of the two
  9268. sprites to the same values.
  9269.    Keep in mind that to modify this from within the copper, you will need to
  9270. use two Move instructions.  This location is usually not written to by the
  9271. programmer.  Instead, it is written to by sprite DMA.
  9272. ----------------------------------------------------------------------------
  9273. $DFF144 SPR0DATA    Sprite Data Register 0
  9274. $DFF146 SPR0DATB
  9275. Status: *W        Denise
  9276.    This location is usually not written to by the programmer.  Instead, it
  9277. is written to by the sprite DMA.  If you write to it directly, write to
  9278. SPR0DATB (high bit of 4 colors) first then to SPR0DATA.  The data will then
  9279. be displayed on every line at the horizontal position specified in SPR0POS
  9280. and SPR0CTL until you write to SPR0DATA again.    SPR0DATA acts as a switch to
  9281. turn the sprite on.  SPR0CTL acts as the corresponding off switch.  The
  9282. weight of the bits for color are as follows:
  9283.       SPR0DATA 1
  9284.       SPR0DATB 2
  9285.       SPR1DATA 4 (if attached)
  9286.       SPR1DATB 8 (if attached)
  9287. ----------------------------------------------------------------------------
  9288. Note: Sprites 0,1 share colors as do 2,3; 4,5; and 6,7
  9289.  
  9290. $DFF148 SPR1POS      (PIXEL VALUE 0 = TRANSPARENT
  9291. $DFF14A SPR1CTL           1 = COLOR REGISTER 17
  9292. $DFF14C SPR1DATA          2 = COLOR REGISTER 18
  9293. $DFF14E SPR1DATB          3 = COLOR REGISTER 19)
  9294. $DFF150 SPR2POS      (SHARES 3'S COLOR REGISTERS...)
  9295. $DFF152 SPR2CTL
  9296. $DFF154 SPR2DATA
  9297. $DFF156 SPR2DATB
  9298. $DFF158 SPR3POS      (PIXEL VALUE 0 = TRANSPARENT
  9299. $DFF15A SPR3CTL           1 = COLOR REGISTER 21
  9300. $DFF15C SPR3DATA          2 = COLOR REGISTER 22
  9301. $DFF15E SPR3DATB          3 = COLOR REGISTER 23)
  9302. $DFF160 SPR4POS      (SHARES 5'S COLOR REGISTERS...)
  9303. $DFF162 SPR4CTL
  9304. $DFF164 SPR4DATA
  9305. $DFF166 SPR4DATB
  9306. $DFF168 SPR5POS      (PIXEL VALUE 0 = TRANSPARENT
  9307. $DFF16A SPR5CTL           1 = COLOR REGISTER 25
  9308. $DFF16C SPR5DATA          2 = COLOR REGISTER 26
  9309. $DFF16E SPR5DATB          3 = COLOR REGISTER 27)
  9310. $DFF170 SPR6POS      (SHARES 7'S COLOR REGISTERS...)
  9311. $DFF172 SPR6CTL
  9312. $DFF174 SPR6DATA
  9313. $DFF176 SPR6DATB
  9314. $DFF178 SPR7POS      (PIXEL VALUE 0 = TRANSPARENT
  9315. $DFF17A SPR7CTL           1 = COLOR REGISTER 29
  9316. $DFF17C SPR7DATA          2 = COLOR REGISTER 30
  9317. $DFF17E SPR7DATB          3 = COLOR REGISTER 31)
  9318. ----------------------------------------------------------------------------
  9319. Location Range $DFF180 - $DFF1BE    Color Registers
  9320.    Each color register contains 12 bits of information, for a total of 4096
  9321. colors.  The registers are set up as follows:
  9322.       0-3 Blue intensity (0 = no blue, 15 = full blue)
  9323.       4-7 Green intensity
  9324.      8-11 Red intensity
  9325.     12-15 Unused
  9326.  
  9327.    There are seven colors which can be represented in 16 intensities.  Those
  9328. colors are, along with their hexadecimal values:
  9329.  
  9330. Gray     Red      Green    Blue     Yellow    Magenta     Cyan
  9331. ----     ---      -----    ----     ------    -------     ----
  9332. FFF     F00      0F0       00F        FF0     F0F        0FF
  9333.  
  9334.    Here is a table of common colors:
  9335.  
  9336. Black - 000      Blue - 00F        Green - 0F0       Cyan - 0FF
  9337. Red   - 0F0      Purple-F0F        Orange- E70       Yellow-FF0
  9338. White - FFF      LtGray-CCC        MdGray- 888       DkGray-444
  9339. ----------------------------------------------------------------------------
  9340. $DFF182 COLOR01   $DFF184 COLOR02   $DFF186 COLOR03   $DFF188 COLOR04
  9341. $DFF18A COLOR05   $DFF18C COLOR06   $DFF18E COLOR07   $DFF190 COLOR08
  9342. $DFF192 COLOR09   $DFF194 COLOR10   $DFF196 COLOR11   $DFF198 COLOR12
  9343. $DFF19A COLOR13   $DFF19C COLOR14   $DFF19E COLOR15   $DFF1A0 COLOR16
  9344. $DFF1A2 COLOR17   $DFF1A4 COLOR18   $DFF1A6 COLOR19   $DDD1A8 COLOR20
  9345. $DFF1AA COLOR21   $DFF1AC COLOR22   $DFF1AE COLOR23   $DFF1B0 COLOR24
  9346. $DFF1B2 COLOR25   $DFF1B4 COLOR26   $DFF1B6 COLOR27   $DFF1B8 COLOR28
  9347. $DFF1BA COLOR29   $DFF1BC COLOR30   $DFF1BE COLOR31
  9348. ----------------------------------------------------------------------------
  9349. 8520 CIA Chips - Location Range $BFD000-$BFDF00
  9350. CIA-B
  9351.    Locations $BFD000-$BFDF00 are used to address the Amiga's second Complex
  9352. Interface Adaptor (CIA-B).  Since the chip itself is identical to the CIA-A,
  9353. which is addressed at $BFE001, the discussion here will be limited to the
  9354. use the Amiga makes of this particular chip.  For more general information
  9355. on the chip registers, see the corresponding entries for CIA-A.  Unlike the
  9356. custom chip registers, the CIA registers are all one byte long and can be
  9357. both read from and written to.
  9358. ----------------------------------------------------------------------------
  9359. $BFD000 PRA         Peripheral Data Register for Data Port A
  9360. Status: R/W         CIA-B
  9361.              0 BUSY   Centronics busy (parallel port pin 11)
  9362.              1 POUT   Centronics paper out (pin 12)
  9363.              2 SEL    Centronics select (pin 13)
  9364.              3 DSR    RS232 data set ready (serial port pin 6)
  9365.              4 CTS    RS232 clear to send (pin 5)
  9366.              5 DCD    RS232 carrier detect (pin 8)
  9367.              6 RTS    RS232 request to send (pin 4)
  9368.              7 DTR    RS232 data terminal ready (pin 20)
  9369. ----------------------------------------------------------------------------
  9370. $BFD100 PRB         Peripheral Data Register for Data Port B
  9371. Status: R/W         CIA-B
  9372.              0 STEP   Move drive head by one track in direction
  9373.                   specified by the DIR bit (set to 1, 0,
  9374.                   then 1 again to move head.)
  9375.              1 DIR    Direction to move drive head (1 = out to 0,
  9376.                   0 = in to track 79+)
  9377.              2 SIDE   Select drive head (1 = bottom, 0 = top)
  9378.              3 SEL0   0 = Select DF0:  1 = not selected
  9379.              4 SEL1   0 = Select DF1:
  9380.              5 SEL2   0 = Select DF2:
  9381.              6 SEL3   0 = Select DF3:
  9382.              7 MTR    Motor on/off status (1 = motor off,
  9383.                   0 = motor on)
  9384.  
  9385.    Notes:
  9386.       Bit 0: After moving the drive's head, it is important that you wait 3
  9387. microseconds before performing any other disk activities.  Since software
  9388. timing loops will be shorter on accelerated Amigas, use the CIA timers.
  9389.       Bit 1: You can check if the drive head of a selected drive is on track
  9390. 0 by reading bit 4 of the CIA-A chip's PRA register located at $BFE001.
  9391.       Bit 2: When you select the head, the value of this bit affects only
  9392. the currently selected drives.
  9393.       Bits 3-6: You may select more than one drive at a time.  Thus, you can
  9394. move the heads on more than one drive simultaneously.
  9395.       Bit 7: This bit turns the motors on and off.  The drive LED is
  9396. directly wired to the motor power.  This bit should be set before you select
  9397. a drive.  If a drive is already selected and you wish to change the state of
  9398. its motor, deselect the drive, set this bit, and then reselect the desired
  9399. drive.
  9400.       When turning on the motor, you must wait for the motor to reach its
  9401. full rotation speed before performing any other disk activities.  Bit 5 of
  9402. the CIA-A's PRA ($BFE001) is set equal to 0 whenever the drive has reached
  9403. full speed and is ready to receive another command.
  9404.       Note that all of this assumes that you have disabled multitasking and
  9405. have taken full control of the computer.
  9406. ----------------------------------------------------------------------------
  9407. $BFD200 DDRA        Data Direction Register A
  9408. Status: R/W        CIA-B
  9409.    A bit set in this register causes the corresponding bit in PRA to be
  9410. defined as output.  A bit clear causes it to be defined as input.  Note that
  9411. bits 0-5 are normally clear, and bits 6-7 are set.
  9412. ----------------------------------------------------------------------------
  9413. $BFD300 DDRB        Data Direction Register B
  9414. Status: R/W        CIA-B
  9415.    This register controls the I/O of PRB.  All bits MUST be set to 1.
  9416. ----------------------------------------------------------------------------
  9417. Location Range: $BFD400 - $BFD700   CIA-B Timers A & B L/H Bytes
  9418.    According to some early Commodore-Amiga manuals, Timer A is reserved for
  9419. Commodore 8-bit serial bus communications - the bus system used by the C64
  9420. to talk to the 1541, 1571, 1581, as well as C64 compatible printers.  For
  9421. all practical purposes, the Amiga has no use for these timers.    Timer B is
  9422. also unused by the operating system.  Feel free to use them yourself.  For
  9423. more details, see the entry for the CIA-A Timer A & B registers at $BFE401
  9424. through $BFE701.
  9425.  
  9426. $BFD400 TALO   Timer A Low Byte.  R/W
  9427. $BFD500 TAHI   Timer A High Byte. R/W
  9428. $BFD600 TBLO   Timer B Low Byte.  R/W
  9429. $BFD700 TBHI   Timer B High Byte. R/W
  9430. ----------------------------------------------------------------------------
  9431. Location Range: $BFD800-$BFDB00     CIA-B TOD Counters
  9432.    This 24 bit timer serves as a horizontal blank counter for the
  9433. graphics.library , and is used to synchronize the output of graphics with
  9434. the position of the video beam.
  9435.    The CIA-B chip's TICK line is connected to the Agnus chip's _HSYNC line,
  9436. so the TOD clock's counter is incremented once every horizontal blank, or
  9437. 31500 times per second.
  9438.  
  9439. $BFD800 TODLO  TOD counter low byte    R/W   CIA-B (0-7)
  9440. $BFD900 TODMID TOD counter mid byte    R/W   CIA-B (8-15)
  9441. $BFDA00 TODHI  TOD counter high byte   R/W   CIA-B (16-23)
  9442. $BFDB00 TODHR  UNUSED - Not connected to the Amiga
  9443. -----------------------------------------------------------------------------
  9444. $BFDC00 SDR         Serial Data Register
  9445. Status: R/W         CIA-B
  9446.    The CIA chip has an on-chip serial port, which allows you to send or
  9447. receive a byte of data one bit at a time, with the MSB (7) shifted out
  9448. first.
  9449.    The CIA-B's SP line, which carries bits to the Serial Data Register, is
  9450. connected to bit 0 of this chip's data port A, and in turn, to pin 11 of the
  9451. parallel port.    The chip's CNT line, which carries the bits that are output
  9452. by the Serial Data Register, is connected to bit 1 of this chip's Data Port
  9453. A, and in turn, to pin 12 of the parallel port.
  9454.    For more information about the use of this register, see the entry for
  9455. location $BFEC01.  The Amiga's operating system does not use this register.
  9456. ----------------------------------------------------------------------------
  9457. $BFDD00 ICR         Interrupt Control Register
  9458. Status: R/W         CIA-B
  9459.         0 R - did Timer A count down to zero? (1 = yes)
  9460.           W - enable or disable Timer A IRQ (1 = enabled  0 = disabled)
  9461.         1 R - did Timer B count down to zero? (1 = yes)
  9462.           W - enable or disable Timer B IRQ (1 = enabled  0 = disabled)
  9463.         2 R - did TOD clock reach alarm time? (1 = yes)
  9464.           W - enable or disable TOD alarm IRQ (1 = en  0 = dis)
  9465.         3 R - did the serial data register finish a byte? (1 = yes)
  9466.           W - enable or disable serial data register IRQ (1/0 = en/dis)
  9467.         4 R - was a signal sent on the FLAG line? (1 = yes)
  9468.           W - enable/disable flag IRQ (1/0 = en/dis)
  9469.         5      UNUSED - always returns a zero
  9470.         6      UNUSED - always returns a zero
  9471.         7 R - did any CIA-A source cause an interrupt? (1 = yes)
  9472.           W - set or clear bits of this register.  (1 = bits written to
  9473.           with a 1 will be set, 0 = bits written with a 1 will be
  9474.           cleared.)
  9475.  
  9476.    This register is used to control the 5 interrupt sources on the 8520 CIA
  9477. chip.  For details on its operation, see $BFED01.
  9478.    The main difference between the two CIA chips pertaining to this register
  9479. is that on CIA-B, the FLAG line is connected to the disk controller's
  9480. DSKINDEX line.    And in order for the Amiga to recognize a CIA-B chip
  9481. interrupt, bit 13 or the INTENA register must be set to 1.  See registers
  9482. INTENA and INTENAR at $DFF09A and $DFF01C for more information on Amiga
  9483. interrupts.
  9484. ----------------------------------------------------------------------------
  9485. Location Range $BFDE00 - $BFDF00    CIA Control Registers A & B
  9486. See locations $BFEE01 and $BFEF01 for details.
  9487. ----------------------------------------------------------------------------
  9488. $BFDE00 CRA         Control Register A
  9489. Status: R/W         CIA-B
  9490.         0 START   Start Timer A (1 = start, 0 = stop)
  9491.         1 PBON    Select Timer A output on Data Port B (1 = Timer B
  9492.               output appears on bit 6 for Data Port B)
  9493.         2 OUTMODE Data Port B output mode (1 = toggle bit 6, 0 = pulse
  9494.               bit 6 every 10 microprocessor cycles)
  9495.         3 RUNMODE Timer A run mode (1 = one shot, 0 = continuous)
  9496.         4 LOAD    Force latched value to be loaded to Timer A counter
  9497.               (1 = force load strobe)
  9498.         5 INMODE  Timer A input mode (1 = count signals on CNT line at
  9499.               pin 1 of keyboard port, 0 = count every 10 uP cycles)
  9500.         6 SPMODE  Serial Port ($BFEC01) mode (1 = output, 0 = input)
  9501.         7 UNUSED
  9502. ----------------------------------------------------------------------------
  9503. $BFDF00 CRB         Control Register B
  9504. Status: R/W         CIA-B
  9505.         0 START   Start Timer B (1 = start, 0 = stop)
  9506.         1 PBON    Select Timer B output on Data Port B (1 = Timer B
  9507.               output appears on bit 7 for Data Port B)
  9508.         2 OUTMODE Data Port B output mode (1 = toggle bit 7, 0 = pulse
  9509.               bit 7 every 10 microprocesor cycles(
  9510.         3 RUNMODE Timer B run mode (1 = one shot, 0 = continuous)
  9511.         4 LOAD    Force latched value to be loaded to Timer B counter
  9512.               (1 = force load strobe)
  9513.       5-6 INMODE  Timer B input mode
  9514.               00 = count every 10 uP cycles
  9515.               01 Count cycles on CNT line at pin 1 of keyboard port
  9516.               10 Count each time that Timer A counts down to 0.
  9517.               11 Count Timer A 0's when CNT pulses are present
  9518.         7 ALARM   Select TOD write status (1 = writing to TOD registers
  9519.               sets counter, 0 = writing to TOD registers sets alarm)
  9520. ----------------------------------------------------------------------------
  9521. Location Range $BFE001-$BFE301     CIA Data Ports A and B
  9522.    These registers allow the Amiga to communicate with the outside world.
  9523. Bits of data written to the PRA and PRB registers ($BFE001 and $BFE101) can
  9524. be sent to external devices, while bits of data those devices send can be
  9525. read here.
  9526.    A bit can be set up for only input or output, not both at once.  To
  9527. define the I/O status of a bit, you use the Data Direction Registers.
  9528. Register DDRA ($BFE201) controls data port A, and register DDRB ($BFE301)
  9529. controls data port B.  1 = output mode, and 0 = input mode.  Note that DDRA
  9530. is preset by the Amiga on power up.  Modifying the contents may cause the
  9531. computer to lock up.
  9532. ----------------------------------------------------------------------------
  9533. $BFE001 PRA         Peripheral Data Register for Data Port A
  9534. Status: R/W         CIA-A
  9535.              0 OVL    Memory overlay bit (Dont change! Keep 0)
  9536.              1 LED    Power LED/Cutoff filter (1 = LED dimmed and
  9537.                   cutoff filter inactive, 0 = LED/filter normal)
  9538.              2 CHNG   Disk Change (1 = no change, 0 = disk has
  9539.                   been removed)
  9540.              3 WPRO   1 = Disk Write Protected    0 = Unprotected
  9541.              4 TK0    1 = head not on trk 0, 0 = head on track 0.
  9542.              5 RDY    1 = currently selected drive is ready for
  9543.                   commands, 0 = not ready.
  9544.              6 FIR0   Fire button on port 1, pin 6 (0 = pressed)
  9545.              7 FIR1   Fire button on port 2, pin 6 (0 = pressed)
  9546.  
  9547.    Notes: On bits 6-7, you may also output data  through pin 6 on either
  9548. game port.  Simply set bit 6 or 7 (depending on which port you wish to
  9549. output data o) in the DDRA register to 1 for output and then toggle the same
  9550. bit in the PRA register.  Setting the PRA bit to one outputs approximately 5
  9551. volts on that line.  Setting the PRA bit equal to zero oulls the line low to
  9552. zero volts.  It is common courtesy to set the data direction registers back
  9553. to their original value after using them.
  9554. ----------------------------------------------------------------------------
  9555. $BFE101 PRB         Peripheral Data Register for Data Port B
  9556. Status: R/W         CIA-A
  9557.              0 D0  Parallel port pin 2
  9558.              1 D1  Parallel port pin 3
  9559.              2 D2  Parallel port pin 4
  9560.              3 D3  Parallel port pin 5
  9561.              4 D4  Parallel port pin 6
  9562.              5 D5  Parallel port pin 7
  9563.              6 D6  Parallel port pin 8
  9564.              7 D7  Parallel port pin 9
  9565.  
  9566.    Notes: This register is used exclusively by the Amiga's parallel port.
  9567. It controls the port's data lines, and is therefore responsible for all
  9568. parallel port transmissions.
  9569.    For example, whenever the Amiga sends a character to a printer that's
  9570. connected to the parallel port, it uses this register.    It just sets all the
  9571. bits in the DDRB equal to one and writes the byte of data to be output here.
  9572. ----------------------------------------------------------------------------
  9573. $BFE201 DDRA         Data Direction Register A
  9574. Status: R/W         CIA-A
  9575.              0 Select bit 0 PRA I/O (Must be 1 = Output)
  9576.              1          1             1
  9577.              2          2             0 = Input
  9578.              3          3             0
  9579.              4          4             0
  9580.              5          5             0
  9581.              6          6        (Normally 0)
  9582.              7          7        (Normally 0)
  9583. ----------------------------------------------------------------------------
  9584. $BFE301 DDRB         Data Direction Register B
  9585. Status: R/W         CIA-A
  9586.    A bit set or clear here makes the corresponding bit in the PRB set for
  9587. output or input, respectively.
  9588. ----------------------------------------------------------------------------
  9589. Location Range $BFE401 - $BFE701    CIA Timers A & B L/H Bytes
  9590.    These four timer registers (two for each timer) have different functions
  9591. depending on whether you are reading from or writing to them.  When you read
  9592. from these registers, you get the present value of the Timer Counter (which
  9593. counts down from its initial value to zero).  When you write to these
  9594. registers, the value is stored in the Timer Latch, and from there it can be
  9595. used to load the Timer Counter using the LOAD bit of the CRA or CRB
  9596. registers (see $BFEE01 and $BFEF01).
  9597.    These interval timers can hold a 16 bit value from 0 to 65535, in low
  9598. byte - high byte format.  Once the Timer Counter is set to an initial value
  9599. and the timer is started, the timer will decrement every 10 uP cycles.
  9600. Since the clock speed of an NTSC Amiga is 7.159090 MHz, using every count
  9601. takes approximatels a millionth of a second.  (10 / 7159090 =
  9602. 0.0000013968256).  The formula for calculating the amount of time it will
  9603. take for the timer to count down from its latch value to zero is:
  9604.       Time = Latch Value / Count Speed
  9605. where Latch Value is the value written to the low and high timer registers,
  9606. and Count Speed is 715909 for NTSC, and 709379 for PAL.
  9607.    When Timer A or B reaches 0, it will set bit 0 or 1 in the Interrupt
  9608. Control Register at $BFED01.  If the timer interrupt has been enabled, an
  9609. interrupt will take place, and the high bit of the Interrupt Control
  9610. Register will be set to one.  Alternately, if the PBON bit is set, the timer
  9611. will wirte data to bit 6 or 7 on Port B.  After the timer gets to zero, it
  9612. will reload the Timer Latch value and either stop or count down again,
  9613. depending on whether it is in one-shot or continuous mode (determined by bit
  9614. 3 of the Control Register).
  9615.    Although usually a timer will be used to count every 10 uP cycles, Timer
  9616. A can also count external pulses on the CNT line, which is connected to the
  9617. Amiga's keyboard.
  9618.    Timer B is even more versatile.  In addition to these two sources, Timer
  9619. B can count the number of times that Timer A goes to zero.  By setting Timer
  9620. A to count the uP clock, and Timer B to count the number of times Times A
  9621. reaches 0, you effectively link the two into one 32 bit timer that can count
  9622. for more than an hour before resetting.
  9623.    In the Amiga, CIA-A Timer A is used to time the transfer of keyboard
  9624. data.  Timer B is used by Exec (the core of the Amiga's multitasking
  9625. operating system) to synchronize task switching; it also serves as the
  9626. timer.device's UNIT_MICROHZ timer.  As a result, neither Timer A or B is
  9627. available for general use.
  9628. ----------------------------------------------------------------------------
  9629. $BFE401 TALO        Timer A Low Byte
  9630. $BFE501 TAHI        Timer A High Byte
  9631. $BFE601 TBLO        Timer B Low Byte
  9632. $BFE701 TBHI        Timer B High Byte
  9633. Status: R/W        CIA-A
  9634. ----------------------------------------------------------------------------
  9635. Location Range $BFE801 - $BFEB01    CIA-A TOD Counters
  9636.    In addition to two general purpose timers, the 8520 CIA has a special
  9637. purpose 24-bit counter that can count up to 16777215 ($FFFFFF).  Unlike the
  9638. chip's other two timers, the TOD clock counts up, and when the TOD clock
  9639. reaches its maximum value, starts over at zero and continues counting.    The
  9640. TOD clock can also be set to generate an interrupt whenever it reaches a
  9641. determined value.
  9642.    The TOD clock increments its counter approximately 60 times per second
  9643. (50 for PAL) - the same frequency as the computer's power line tick.
  9644.    The TOD registers can be used for two purposes, depending on whether you
  9645. are reading from or writing to them.  If you are reading from them, you will
  9646. always be reading the timer's current value.  There is a latching feature
  9647. associated with the high byte register that freezes the other two bytes
  9648. until you read the low byte.  This is to keep inaccurate readings from
  9649. occurring.  (Note that the timer will not continue to count until you read
  9650. the low byte!)
  9651.    Writing to these registers sets either the counter or alarm time
  9652. depending on the setting of bit 7 of Control Register B (CRB, $BFEF01).  If
  9653. that bit is set to 1, writing to the TOD registers sets the alarm.  If the
  9654. bit is set to zero, writing to the TOD registers sets the clock.  In either
  9655. case, as with reading the registers, there is a latch function.  This
  9656. function stops the clock from updating when you write to the high byte
  9657. register.  The clock will not start again until you write to the low byte
  9658. register.
  9659.    The CIA-A's TOD clock serves as the timer.device's UNIT_VBLANK timer.
  9660. Unlike the Timer A driven UNIT_MICROHZ clock (which is also used by Exec),
  9661. UNIT_VBLANK is not slowed down if the computer is running several programs
  9662. at once.
  9663. ----------------------------------------------------------------------------
  9664. $BFE801 TODLO         TOD Counter Low Byte
  9665. $BFE901 TODMID         TOD Counter Mid Byte
  9666. $BFEA01 TODHI         TOD Counter High Byte
  9667. $BFEB01 TODHR         UNUSED - Not connected to the Amiga
  9668. Status: R/W         CIA-A
  9669. ----------------------------------------------------------------------------
  9670. $BFEC01 SDR         Serial Data Register
  9671. Status: R/W         CIA-A
  9672.    The CIA chip has a built in serial port, which allows you to send or
  9673. receive a byte of data one bit at a time, with the MSB (7) shifted out
  9674. first.    Control Register A at $BFEE01 allows you to choose input or output
  9675. modes.    In input mode, a bit of data is read from the chip's SP line
  9676. whenever a signal on the CNT line appears.  After 8 bits are received, and
  9677. the data has been placed in the SDR, an interrupt is generated to let you
  9678. know that the register should be read.
  9679.    In output mode, you write data to the SDR, and it is sent out over the SP
  9680. line using Timer A for the baud rate generator.  Whenever a byte of data is
  9681. written to using this register, transmission will start as long as Timer A
  9682. is running in continuous mode.    Data is sent at half the Timer A rate, and
  9683. an output will appear on the CNT line whenever a bit is sent.  After all 8
  9684. bits have been sent, an interrupt is generated to indicate that it is time
  9685. to load the next byte to send into the Serial Data Register.
  9686.    The Amiga usus this register to receive data from the keyboard's KDAT
  9687. line (via pin 2 of the keyboard port), and the CNT line is connected to the
  9688. keyboard's KCLK line (via pin 1 of the keyboard port).  Data is never sent
  9689. to the keyboard, so this register is always operating in input mode.
  9690.    By reading this register directly, you can find the RAWKEY value of the
  9691. current key being pressed.  A rawkey value specified the physical location
  9692. of the key on the keyboard.  Normally, the Amiga's operating system reads
  9693. the value from the SDR and uses the computer's current keyboard map table
  9694. (such as USA1) to convert it to ASCII.    Keymap tables are important because
  9695. different countries use different keyboard layouts.  There are at least 15
  9696. different Amiga keyboard configurations in existance.
  9697.    The number returned does not have the high bit (7) set during the key
  9698. press.    However, when the key is released, bit 7 is set.  Thus, a key's
  9699. release value is 128 greater than its depress value.
  9700.    You should know the shift or control keys do not modify the rawkey
  9701. values.  Instead, the shift or control keys send their own rawkey codes.
  9702.    There are six special codes that can be sent via the SDR:
  9703.       $78 - Control/Amiga/Amiga
  9704.       $F9 - Ignore last character: transmission error
  9705.       $FA - 10 character keyboard buffer is full
  9706.       $FC - Keyboard self test failed
  9707.       $FD - Header: Any following codes were keys pressed on power up
  9708.       $FE - Termination code after the keys pressed on power up.
  9709.         (i.e.: $FD xx xx ... $FE)
  9710.    Using the console.device's RawKeyConvert() functiom, you can convert a
  9711. rawkey code to normal ASCII.
  9712.  
  9713. ----------------------------------------------------------------------------
  9714. $BFED01 ICR         Interrupt Control Register
  9715. Status: R/W         CIA-A
  9716.    Notes: Bit layout is the same as the ICR at $BFDD00.  This register is
  9717. used to control the five interrupt sources on the 8520 CIA chip.  These
  9718. sources are Timer A, Timer B, the TOD clock, the SDR, and the chip's FLAG
  9719. line.  Timer's A & B cause an interrupt when they count down to zero.  The
  9720. TOD clock generates an alarm when it reaches the alarm time.  The SDR
  9721. generates an interrupt when it compiles 8 bits of input or output.  An
  9722. external signal pulling the CIA chip's FLAG line low will also cause an
  9723. interrupt (on CIA-A, the FLAG line is connected to the ACK line - pin 10 of
  9724. the parallel port).
  9725.    Even if the conditions for an interrupt are satisfied, the interrupt must
  9726. still be enabled for the interrupt to occur.  This is done by writing to the
  9727. ICR.  What happens when you write to this register depends on the way you
  9728. set bit 7.  If it is set to 0, any bit you write to with a 1 is cleared.  If
  9729. it is set to a 1, any bit that you write to with a 1 is set, and the
  9730. corresponding interrupt is enabled.  In either case, any bits written to
  9731. with a zero will be unaffected.
  9732.    For example, to disable all interrupts from machine language, you could
  9733. MOVE.B #$7F,$BFED01.  Don't try this with multitasking turned on, as it will
  9734. turn off Timer B, which handles task switching.
  9735.    To turn on a Timer B interrupt, a program could MOVE.B #$82,$BFED01.  Bit
  9736. 7 is set to 1, and so is bit 1, so the interrupt which corresponds with bit
  9737. 1 (Timer B) is enabled.
  9738.    When you read this register, you can tell if any of the conditions for a
  9739. CIA interrupt were satisfied because the corresponding bit will be set to a
  9740. one.  For example, if Timer A counter down to zero, you would read a #$01
  9741. from this register.  If in addition the enable bit that corresponds to that
  9742. interrupt source is set to 1 and an interrupt occurs, bit 7 will also be
  9743. set.  This allows a multi-interrupt system to read one bit and see if the
  9744. source of a particular interrupt is CIA-A.  You should note, however, that
  9745. reading this register clears it, so you should preserve its contents if you
  9746. want to test more than one bit.  In order for the Amiga to recognize a CIA-A
  9747. chip interrupt, bit 3 of the INTENA register must be set to 1.    See
  9748. registers INTENA and INTENAR ($DFF09A, $DFF01C) for more information.
  9749. ----------------------------------------------------------------------------
  9750. $BFEE01 CRA         Control Register A
  9751. $BFEF01 CRB         Control Register B
  9752. Status: R/W         CIA-A
  9753.    See $BFDE00 and $BFDF00 for information on the bit layout.
  9754. ----------------------------------------------------------------------------
  9755. This completes "Mapping the Amiga" from Compute! Books.  For information
  9756. on system structures, examine your C and assembler Include files.  They
  9757. have much better information than the book.
  9758. Slates from Bansai
  9759. 05/26/91
  9760. ----------------------------------------------------------------------------
  9761.